A data engineering team is evaluating whether to use Spark Structured Streaming directly (via the DataFrame API) or Lakeflow Spark Declarative Pipelines (Lakeflow SDP) for a new production pipeline. The pipeline reads from a Kafka topic, applies a series of transformations including deduplication, type casting, and a join with a slowly changing dimension table, writes a Silver table, and feeds a Gold aggregation table. The team has five engineers with varying levels of Spark expertise. Which statement MOST accurately compares the two approaches for this specific use case, and leads to the correct recommendation?
Show answer & explanation
Correct answer: A
WHY A: For a multi-table pipeline with quality checks, dimension joins, and multiple output tables, Lakeflow SDP provides substantial advantages: automatic checkpoint management (no manual checkpoint path configuration), declarative data quality with CONSTRAINT clauses, automatic DAG dependency resolution between Silver and Gold tables, Unity Catalog lineage, and the AUTO CDC API for SCD patterns. Teams with mixed Spark expertise benefit from the higher-level declarative abstractions that reduce boilerplate and error-prone state management code. WHY NOT B: Lakeflow SDP fully supports Kafka as a streaming source via Spark Structured Streaming's Kafka connector under the hood. WHY NOT E: Lakeflow SDP supports both TRIGGERED and CONTINUOUS modes. CONTINUOUS mode runs as a persistent streaming job with sub-minute latency, comparable to direct Structured Streaming. There is no fixed 2–5 minute delay. WHY NOT D: Lakeflow SDP uses Python and SQL, not a proprietary YAML language. Pipeline definitions are written in SQL CREATE STREAMING TABLE / AUTO CDC INTO syntax or Python decorators — these are standard languages, not new abstractions. WHY NOT C: Lakeflow SDP has no table count limit. There is no 10-table restriction; production pipelines can contain dozens or hundreds of tables.