Forum Discussion
SpiroTaleski
4 years agoValued Contributor
I don’t believe that you can dinamically adjust the number of selected key columns per case(dataset).
If each dataset would have the same number of key columns(but different columns) then you would be able switch the key columns by using the ternary expressions.
In your case, probably you should have separate bulk upsert for each dataset or to standardize each dataset to have the same number of key columns. Or, third option to check if there is a way to achieve the same by using the Snowflake upsert query.
Regards,
Spiro Taleski