QuestionQ266

VerifiedDevelopment and Ingestion

A data engineer is using Auto Loader with schema evolution enabled to ingest semi-structured JSON log files into a Delta table. A new string field named userAgent appears in the JSON data.

What happens to the new userAgent field?

Explanation

With Auto Loader's schema evolution enabled (the default addNewColumns mode), when a new field is detected in the incoming data, Auto Loader automatically adds it to the target Delta table's schema as a new nullable column. Existing rows that predate the new field simply have a null value for that column, while new records that include the field have it populated. This is the documented default behavior for schema evolution in Auto Loader, which triggers a metadata update (and stream restart) to incorporate the new column rather than failing or silently dropping the data.

Learn more

Community Discussion

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