QuestionQ20

VerifiedData Modelling

A junior data engineer is implementing logic for a Lakehouse table named silver_device_recordings. The source data has 100 unique fields within a highly nested JSON structure.

The silver_device_recordings table will be used downstream to support several production monitoring dashboards and a production model. Currently, 45 of the 100 fields are used by at least one of these applications.

The data engineer is determining the best approach to schema declaration given the data’s highly nested structure and numerous fields.

Which of the following correctly states information about Delta Lake and Databricks that could affect their decision-making process?

Explanation

Databricks schema inference for JSON and other semi-structured sources is intended to accommodate observed input and avoid type-mismatch issues; Auto Loader infers JSON fields as strings by default, while sampled inference can select broader compatible types. Declaring the intended types manually, or supplying schema hints, lets a Delta table enforce its defined schema on write, providing stronger assurance that production dashboard and model inputs conform to expected data types.

Learn more

Community Discussion

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