Alteryx Connect Discussions

Find answers, ask questions, and share expertise about Alteryx Connect.
SOLVED

Customized file/Alteryx loader

RafaelZincke
7 - Meteor

Hi,

 

I am building a customized loader that reads in workflows from the shared drive and loads these to connect. In the last step when I push the data to connect, I receive the following error:

 

"Caused by: Unique index or primary key violation: "STD_XFORMS.PRIMARY_KEY_35 ON STD_XFORMS.AYX_WF(WORKFLOW_ID) VALUES 11273"; SQL statement:
insert into AYX_WF(LOAD_CODE,WORKFLOW_ID,WORKFLOW_NAME,STUDIO,OWNER_ID,OWNER_NAME,WORKFLOW_TYPE,DATE_UPLOADED,NUMBER_OF_RUNS,PUBLISHED_VERSION_ID,PUBLISHED_VERSION_NUMBER,COLLECTION,URL) values (?,?,?,?,?,?,?,?,?,?,?,?,?) [23505-200]"

 

Apparently, one of ten test entries was able to write to AYX_WF but I do not see why?

 

Any help is appreciated.

 

Best regards,

Rafael

2 REPLIES 2
PetrH
Alteryx
Alteryx

Hi Rafael,

the primary key violation message means that you are inserting duplicate data somewhere where its not wanted.
On table AYX_WF there is just WF_ID as primary key. 

So it means that you are inserting duplicate workfliw to the stage table.

You need to avoid a duplicate, or maintain the cleaning of stage tables (based on LOAD_CODE)same way as the loaders does. 

PetrH_0-1623311063051.png

 

Hope its helpful.

Petr

RafaelZincke
7 - Meteor

Thank you Petr!