QuestionQ243

VerifiedDeveloping Code for Data Processing using Python and SQL

The data engineering team maintains this code:

Question Image

Assuming this code produces logically correct results and the source table’s data has been de-duplicated and validated, which statement describes what happens when the code is executed?

Explanation

The transformation reads all records in silver_customer_sales, aggregates them by customer_id, and writes the resulting customer-lifetime summary to gold_customer_lifetime_sales_summary. PySpark DataFrameWriter.mode("overwrite") overwrites existing data in the target table. The code contains no streaming trigger, incremental change detection, or key-based merge operation, so it is a batch overwrite of the full aggregated result.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!