DP-700 · Question #98
You have a Fabric workspace that contains a lakehouse named Lakehouse1. Lakehouse1 contains a table named Status_Target that has the following columns: - Key - Status - LastModified The data source…
The code snippet for completing the statement:``python .merge(sourceDF, "sourceDF.Key" = "targetDF.Key") .whenMatchedUpdate( set = {"targetDF.LastModified": "sourceDF.LastModified"} ) .whenNotMatchedInsert( values = {"targetDF.Key": "sourceDF.Key", "targetDF.LastModified"…
Question
Exhibit
Explanation
The code snippet for completing the statement:```python .merge(sourceDF, "sourceDF.Key" = "targetDF.Key")
.whenMatchedUpdate( set = {"targetDF.LastModified": "sourceDF.LastModified"} ) .whenNotMatchedInsert( values = {"targetDF.Key": "sourceDF.Key", "targetDF.LastModified": "sourceDF.LastModified", "targetDF.Status": "sourceDF.Status"} ) .whenNotMatchedBySourceUpdate( condition = "targetDF.LastModified" < (current_date() - INTERVAL '7' DAY)", set = {"targetDF.Status": "inactive"} ) .execute()
Dropdown selections:
1. .whenMatchedUpdate
2. .whenNotMatchedInsert
3. .whenNotMatchedBySourceUpdate
Available options for each dropdown: .whenMatchedInsert, .whenMatchedUpdate, .whenNotMatchedBySourceInsert, .whenNotMatchedBySourceUpdate, .whenNotMatchedInsert, .whenNotMatchedUpdate
Topics
Community Discussion
No community discussion yet for this question.
