Subdomain 1.3: Configure pipeline for production use
1.Scenario: An upstream team adds a new column to their dataset. Your production pipeline, which uses `df.select("*")`, processes this dataset and writes to an output. Downstream pipelines suddenly fail because they do not expect the new column. How should you prevent this schema evolution issue in the future?
- A.Enable automatic schema inference on all downstream datasets.
- B.Explicitly define and select only the required columns in your transform.
- C.Use a dynamic schema registry to automatically update downstream code.
- D.Configure a Data Health check to fail if the column count changes.
Show answer & explanation
Correct answer: B — Explicitly define and select only the required columns in your transform.
- A. Automatic schema inference makes pipelines more permissive but facilitates the propagation of unexpected schema changes. In this scenario, it would allow the new column to flow through to all downstream datasets, potentially causing failures across the entire graph instead of isolating the change.
- B. Explicitly selecting only the columns required for your logic creates a stable schema contract. By avoiding `select("*")`, you ensure that upstream schema drift (like adding new columns) does not affect your output, protecting downstream consumers from unexpected changes.
- C. Dynamic schema registries are not a standard or recommended pattern in Foundry for isolating schema changes. Automatically updating downstream code is inherently risky, introduces tight coupling, and often leads to broken transformations that rely on specific column counts or names.
- D. While a Schema Data Health check can alert you to changes in column count, it is a reactive measure. It does not prevent the new column from being written to the dataset, nor does it resolve the underlying issue of an unstable schema contract in the transformation code.