Synape Mapping Dataflow Delta Sink is Failing When Partition Pruning is Applied

Mujah 1 Reputation point
2022-02-17T13:04:26.18+00:00

Hi everyone,

We are upserting data into delta table using mapping dataflow in Synapse studio.

But when partition pruning is applied the upsert fails with org.apache.spark.sql.AnalysisException

org.apache.spark.sql.AnalysisException: Failed to resolve  
;;  
'DeltaMergeInto (((id#4355 = id#6794) && (rowHash#4366 = rowHash#6805)) && createdDate#6807 IN (19019)), [Update [condition: ((NOT ((source.`rd6c1f498e225442f868a2a54189ffd0a` & 2) = 0)) OR (NOT ((source.`rd6c1f498e225442f868a2a54189ffd0a` & 8) = 0))), actions: `createdOn` = source.`createdOn`, `id2` = source.`id2`, `pr` = source.`pr`, `type` = source.`type`, `version` = source.`version`, `pbcT` = source.`pbcT`, `createdDate` = source.`createdDate`, `modifiedDat` = source.`modifiedDat`, `id4` = source.`id4`, `createdBy` = source.`createdBy`, `createdDate` = source.`createdDate`, `id3` = source.`id3`, `runId` = source.`runId`, `src` = source.`src`, `lastModifiedBy` = source.`lastModifiedBy`], Delete [condition: (NOT ((source.`rd6c1f498e225442f868a2a54189  

175418-image.png

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
4,925 questions
{count} votes

1 answer

Sort by: Most helpful
  1. ShaikMaheer-MSFT 38,441 Reputation points Microsoft Employee
    2022-02-18T15:26:37.123+00:00

    Hi @Mujah ,

    Thank you for posting query In Microsoft Q&A Platform.

    Partition Pruning expects value as array. So could you please try below expression and see if that helps.

    array(toDate($runDate,'yyyy-MM-dd'))

    Please let us know how it goes. Thank you.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.