Merge option not merging in ETL | james welch | 2015-02-26 09:18 | |||||||||||||||||||||
Status: Closed | |||||||||||||||||||||||
Hi - I'm new to LabKey - it's a great tool, but I've come across a problem I hope someone can help me with. I'm trying to create an example ETL that sucks data out of an external PostgresQL table and copies it into a list. My ETL xml file is defined as follows. <code> <?xml version="1.0" encoding="UTF-8"?> <etl xmlns="http://labkey.org/etl/xml"> <name>Example: Cities to Labkey List</name> <transforms> <transform id="transfer1"> <description>description</description> <source schemaName="cities" queryName="city"/> <destination schemaName="lists" queryName="MyList" targetOption="merge"/> </transform> </transforms> <incrementalFilter className="ModifiedSinceFilterStrategy" timestampColumnName="updated" /> <schedule><poll interval="2m" /></schedule> </etl> </code> This works for inserting newly added data. But when I modify a pre-existing row, the ETL fails with the following error: ERROR: duplicate key value violates unique constraint "c2d22_mylist_pk" ... Detail: Key (id)=(30) already exists. Where: SQL statement "INSERT INTO list.c2d22_mylist (...) It looks as though the filter is trying to INSERT on a duplicate key, rather than UPDATE as intended. Am I doing something wrong, or have I misunderstood the documentation? Many thanks. |
|||||||||||||||||||||||
| |||||||||||||||||||||||