Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Do not update data if key exists

I need to lookup a key and insert record if it does not exist. The record should not be updated if the key exists. Is there a component I can use (I cannot use the Table Update because the data gets updated if the key exists)

2 Community Answers

Matillion Agent  

Kalyan Arangam —

Hi Shilpa,

You may use the EXCEPT transformation component to compare your incoming(primary) dataset with the existing (comparing) table.

https://redshiftsupport.matillion.com/customer/en/portal/articles/1991919-except-component

Alternatively, use the DETECT CHANGES component to compare both tables, identify new records and then the TABLE OUTPUT component to append the data to your comparison-table.

https://redshiftsupport.matillion.com/customer/en/portal/articles/2329042-detect-changes-component?b_id=8915

Hope that helps.

Best,
Kalyan


Shilpa Siddhanti —

The 'DETECT CHANGES' component with a combination of the filter component(to identify new rows) and Table Output Component(to append the new rows) worked.

Thank you for your quick response Kalyan.

Post Your Community Answer

To add an answer please login