1

I am trying to build a data pipeline that process order data in ADF.I have two payloads of Order received event and Order Update event which have customer ID and few other keys as my primary key.I'm trying to up-sert the record as my operation. When running the records (one order received and other order update) for same customer number ADF is throwing Primary key error as it cannot insert multiple values for same customer number and other keys.

PS: Order received event is when customer gives order and Order update event is an update for that order(if the given order is either acknowledge or cancelled or held) so this update should be upserted in our sql table.I have done everything as of my knowledge in ADF such as adding keys,mapping , checking upserting and inserting boxes correctly etc.

Kindly help.

  • Can you add some specifics? Screenshots and details will go a long way towards someone being able to address your issue. Are you using a Data Flow? How are you configuring for upsert? – Joel Cochran Jul 06 '22 at 15:33

1 Answers1

0

Are you using SQL or MYSQL ? The UPSERT is supported specfically to SQL .

https://github.com/MicrosoftDocs/azure-docs/blob/main/articles/data-factory/connector-azure-sql-database.md#sink-transformation

Settings specific to Azure SQL Database are available in the Settings tab of the sink transformation. Update method: Determines what operations are allowed on your database destination. The default is to only allow inserts. To update, upsert, or delete rows, an alter-row transformation is required to tag rows for those actions. For updates, upserts and deletes, a key column or columns must be set to determine which row to alter.

HimanshuSinha
  • 1,650
  • 2
  • 6
  • 10