concept module in category cloud

This is an excerpt from Manning's book Designing Cloud Data Platforms.
Table 5.1 Processing Data in the warehouse vs. in the lake
Processing data in the data lake (Spark)
Processing data in the data warehouse (SQL)
Flexibility
Processing done in the data lake brings additional flexibility as outputs can be used not just for data served in the data warehouse but also for data that can be delivered to or consumed by other users and/or systems
Outputs of data processing are typically restricted to use in the data warehouse.
Developer Productivity
Once trained, developers will appreciate the power and flexibility of Spark with its sophisticated testing frameworks and libraries to accelerate code delivery.
While not designed as a programming language, SQL’s popularity means that finding people who know it is relatively easy, so using SQL instead of learning Spark can mean a faster time to value
Data Governance
Processing data as close to the source as possible supports more consistent use of transformed data across different sinks and reduces the risk of multiple people transforming data in the sink and defining data differently
Processing data in the data warehouse can support a data governance program but if processing is also done in the data lake, conflicts on data definitions may emerge
Cross Platform Portability
Spark produces fully portable code that is independent of the cloud vendor. Changing from one data warehouse to another is easier if transformations don’t also need to be changed. No migration and minimaL testing would be involved.
Transforms done in ANSI-SQL is supported by all of the major cloud provider’s data warehouse offerings, and is portable provided that no extra cloud vendor-specific add-ons have been added. Work will be involved to migrate and test code
Performance
No amount of processing will impact data warehouse users when processing is done outside the data warehouse.
Most modern cloud data warehouses provide great performance out of the box but some may suffer as processing load increases.
Speed of Processing
Real-time analytics always possible
Real-time is possible in some cloud data warehouses but involves multiple steps and/or products
Cost
When cloud data warehouse vendors charge for processing it will be much less expensive to do processing in the lake
Depending on the data warehouse selected and the commercial terms associated with it, processing in the data warehouse can be expensive
Reusability
Reusable functions and modules are readily available in Spark. All processing jobs are available, not just to deliver data to the cloud data warehouse but also to deliver processed data to other destinations, an increasingly popular use of cloud data platforms
When available in cloud data warehouses, stored procedures and functions can provide reusable code
In a cloud data platform we can add schema management to the other typical steps (data format conversion, deduplication, data quality checks) performed by a data transformation pipeline. The schema management module in a pipeline checks if the schema for this data source already exists in the Schema Registry. If it doesn’t, the module will Infer the schema from the incoming data and register it as Version 1 of the schema in the Registry. If the schema already exists, the module will fetch the current version of the schema from the Registry, infer the schema from the incoming data, compare the inferred schema to the current schema in the Schema Registry and create a new schema version that combines old and new definitions in a backward compatible way, and publish the new schema version into the Registry for other pipelines to use.