QuestionQ267

VerifiedData Ingestion & Acquisition

To support near-real-time workloads, a data engineer is building a helper function that uses Databricks Auto Loader schema-detection and schema-evolution capabilities. The intended function will automatically infer the schema directly from the source, incrementally process JSON files as they arrive in a source directory, and automatically evolve the table schema when new fields are detected.

The function is shown below with a blank:

Question Image

Which response correctly fills the blank while meeting the stated requirements?

Explanation

Auto Loader uses cloudFiles.schemaLocation to infer and track the source schema. A Structured Streaming sink requires checkpointLocation to process arriving files incrementally and reliably, and mergeSchema=true on the streaming write enables newly inferred fields to be added to the target table schema. A continuously running stream is appropriate for near-real-time ingestion; an available-now trigger instead processes available data and terminates.

Learn more

Community Discussion

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