Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Loading CSV to Database results in only a single row

I'm using tFileInputDelimited => tMap => tDBOutput to load data from a CSV file to a PostgreSQL database. As shown in the attached image, in tMap, all columns are mapped except two, (1) the primary database key, which is a postgreSQL BIGSERIAL (autogenerated) and (2) the_geom column, which is a postGIS geometry column and nullable for now. If I set tDBOutput to "drop table if exists and create" and "insert' I immediately get an error of a duplicate primary key (value of zero) when I run the process. If I set to "update and insert" or "insert and update" I end up with only a single row with primary key zero after all the data transfers. The database table starts off empty or with the single row previously mentioned. I assume this problem is caused by PostgreSQL's primary key, but I don't know how to confirm that or to fix the problem. I'd welcome advice. 

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

I didn't realize I still need to send some data to postgreSQL's BIG SERIAL autoincrement field. This post explained how https://community.talend.com/t5/Design-and-Development/How-to-insert-to-table-has-an-auto-increment-.... My process is working now.

 

View solution in original post

1 Reply
Anonymous
Not applicable
Author

I didn't realize I still need to send some data to postgreSQL's BIG SERIAL autoincrement field. This post explained how https://community.talend.com/t5/Design-and-Development/How-to-insert-to-table-has-an-auto-increment-.... My process is working now.