Ultimate access to all questions.
A data engineer is utilizing a foreachBatch
logic to upsert data into a target Delta table. The function to be invoked at each new microbatch processing is shown below with a blank:
def upsert_data(microBatchDF, batch_id):
microBatchDF.createOrReplaceTempView("sales_microbatch")
sql_query = """
MERGE INTO sales_silver a
USING sales_microbatch b
ON a.item_id=b.item_id
AND a.item_timestamp=b.item_timestamp
WHEN NOT MATCHED THEN INSERT *
"""
________________
Which option correctly fills in the blank to execute the SQL query in the function on a cluster with Databricks Runtime below 10.5?