0

Having some issues updating a Snowflake database by inserting/updating records based on a primary key. Getting this error below:

enter image description here

My set up:

I have set a primary key in the Snowflake DB "PRIMARY_KEY", using the statement:

ALTER TABLE [TABLE NAME] ADD PRIMARY KEY (PRIMARY_KEY);

enter image description here

I have the same field "PRIMARY_KEY" in my Alteryx DB that I am using to write to the Snowflake table.

enter image description here

My output options are:

enter image description here

I am using the Snowflake Driver ODBC Driver 2.23.2

Is there anything I can do to fix this? Thanks!

  • As I read this is thrown by Alteryx, maybe [this solution](https://community.alteryx.com/t5/Alteryx-Designer-Discussions/primary-Key-required-for-Update-option-Oracle-ODBC-but-Primary/m-p/467791) applies to you? – Sergiu Sep 24 '21 at 15:04

1 Answers1

0

You can define Primary Keys in Snowflake but Snowflake does not enforce them, in all honesty it's just informational and useful for tools that use that definition.

The error message you're receiving is likely an Alteryx error, not Snowflake. Is there a way to see what code is being generated by Alteryx? I suspect the generated code to run an update is missing what to update by.