Does snowflake support updating/inserting all columns with a syntax like UPDATE *
or INSERT *
MERGE INTO events
USING updates
ON events.eventId = updates.eventId
WHEN MATCHED THEN
UPDATE *
WHEN NOT MATCHED THEN
INSERT *
similar to how Databricks does it: https://docs.databricks.com/spark/latest/spark-sql/language-manual/delta-merge-into.html
Or do we have to list out each column and its value ?
I am getting the error when I try the above
syntax error ... unexpected '*'.
and the docs dont help much: https://docs.snowflake.com/en/sql-reference/sql/merge.html
Thanks,
MERGE
as Sql Server does. In any case, to me, the documentation seems pretty clear that you will need aSET
clause for each column as is required by Postgres and Sql Server. It's a cool feature what Databricks offers, but that's the first time I've seen such syntax. – Birdman