We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Primary Key required for Update option

anjaliaithal
7 - Meteor

I've inherited a workflow and am getting an issue while running the last output tool

Output Tool Data Source: AWS Redshift

Schemas.TableName: All in lower case [Ref article: https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Amazon-Redshift-Error-Output-Data-P...]

Output Options: Update Insert,if new

Primary Field Name in Workflow and in Table- pk

Error when I run: Primary Key required for Update option

When I click on Pick  Primary Key Fields- Message. Primary Key creation is supported for create and overwrite only

 

It will be of great help to know if someone  has encountered the same issue and how to resolve it.

anjaliaithal_1-1621528454619.png

 

anjaliaithal_0-1621528431194.png

anjaliaithal_3-1621528930845.png

anjaliaithal_4-1621529008785.png

 

anjaliaithal_2-1621528555663.png

 

 

5 REPLIES 5
mceleavey
17 - Castor
17 - Castor

Hi @anjaliaithal ,

 

This usually happens when your fields don't exactly match the table. You have to have ALL fields for the query, not only the ones you're using.

Check that all fields are present and mapped and then give it a try.

 

M.



Bulien

anjaliaithal
7 - Meteor

@mceleavey ,

 

Thanks for the quick reply. All the fields are mapped. I did do a custom mapping to be sure. The error persists.

mceleavey
17 - Castor
17 - Castor

@anjaliaithal ,

 

Ah, this might actually be a permissions problem. You're using the "update. Insert if new" option, which means you're trying to insert a new record if it doesn't already exist, but it looks like either the primary key is system generated, which therefore won't allow you to insert a new record with a primary key, or you don't have write permission, only update.

 

M.



Bulien

anjaliaithal
7 - Meteor

It's a generic admin username and password, not auto-generated.

It's a unique combination of different columns that acts as a primary key. The datatype., precision, name all are the same in the workflow as well as the table.

 

anjaliaithal
7 - Meteor

I had to update AWS Drivers. This resolved my issue.

Labels
Top Solution Authors