The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi
I am trying to insert a hardcoded data in the Delta table merge operation both during creation and update. However, the Delta table merge api is giving erorrs
My code to create by update columns
Solved! Go to Solution.
Hi
I can confirm that the merge condition is right, When i remove the date columns from update_columns or create_columns then the merge is successful.
Also when i use the same date or timestamp column in withColumn then i see no issues.
Hi @priyankabis ,
It looks like you’re trying to perform a merge operation on a Delta table with hardcoded data, but encountering errors. Here are a few things to check and consider:
Firstly, ensure that the data types and formats of the columns in update_columns and create_columns match those in the Delta table schema. For example, to_date and to_timestamp should be correctly formatted.
The condition in the merge function should be a valid SQL expression. Ensure that target.entity_id = source.merge_key and target.latest = 1 is correctly referencing the columns.
Finally you need to make sure that the column names in update_columns and create_columns are exactly the same as those in the Delta table.
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi
I can confirm that the merge condition is right, When i remove the date columns from update_columns or create_columns then the merge is successful.
Also when i use the same date or timestamp column in withColumn then i see no issues.