A Lakeflow pipeline in Azure Databricks parses JSON order events from a Kafka topic. The exhibit shows the current streaming table definition. Producers sometimes add new fields to the events.
You must change the from_json options to meet these requirements:
order_idmust be parsed as INT andamountas DECIMAL(10,2), not left to automatic inference.- When producers add new fields, the parsed schema must not gain new columns.
- Values of new fields must be retained so analysts can review them later.
- The pipeline must continue processing when new fields appear.
CREATE OR REFRESH STREAMING TABLE orders_parsed AS SELECT from_json(CAST(value AS STRING), NULL, map('schemaLocationKey', 'orders_schema')) AS parsed FROM STREAM read_kafka( bootstrapServers => 'kafka_server:9092', subscribe => 'orders_topic' )
Which two key-value entries should you add to the map() options of from_json? Each correct answer presents part of the solution. Select two.
Two separate settings are needed. schemaHints fixes the types of order_id and amount instead of leaving them to inference. schemaEvolutionMode set to rescue keeps new fields out of the schema but stores their values in _rescued_data, so the pipeline keeps running. Each other mode fails one requirement: addNewColumns (the default) grows the schema, failOnNewColumns stops the pipeline, and none discards the new values.