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

Table Update in matillion etl for snowflake

i'm little bit confused about table update component.can anyone let me know how to update data using update component in matillion etl for snowflake?

2 Community Answers

Matillion Agent  

Kalyan Arangam —

Hi,

Basically the “Table Update” component needs an incoming connection which defines new data. Then you set the Target Table, Column mapping and identify Unique Keys which will be used to match rows to be updated. Please see the following link for more information – https://snowflakesupport.matillion.com/customer/en/portal/articles/2043155-table-update-component

The Example section has screenshots and explanation of very simple example of the component at work. Hope that helps.

Best
Kalyan


Matillion Agent  

Kalyan Arangam —

Hi,

In addition to my previous response, I found another response for the same question which may give you some more detail. Below is a link to a job-export that demonstrates what you can do with the Table Update component, and also what you can not do.

https://s3-eu-west-1.amazonaws.com/mtln-stage-bucket/SnowflakeMerge.json

Please download and import into your project to see it in action.

You can generate more than one “WHEN MATCHED” clause by adding lines into the When Matched property. The “Case” converts into a Boolean condition and if present appears as an AND after the WHEN MATCHED, i.e.
WHEN MATCHED AND whatever

It’s actually not validated at compile time so if you put nonsense SQL in the field it still validates cleanly, but fails at runtime.

However, I can confirm that you can not have different actions in those different branches: it either does the update based on the Update Mapping, or else a delete. So the component is just not sophisticated enough to generate the single MERGE statement you are trying to create.

Hope that helps.

Best
Kalyan

Post Your Community Answer

To add an answer please login