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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

postgresql format problems for insert

I'm new to Talend (downloaded TOS_DI-r104014-V5.3.1 last week) and trying to use it with Postgresql 10.12.0.2.
I read in a csv file using tFileInputDelimited, map the column names to my database table using tMap, and then attempt to insert into my table using tPostgresqlOutput. When I run in Traces Debug I can see my data moving through properly.
But when I try running it, I am getting error messages when trying the insert as it is not formatted correctly. This is what is shown in the error window on the Run tab (one row example as there are thousands):
Batch entry 0 INSERT INTO "dwh"."all_data" ("timestamp","action","session_id","src_user_id","src_community_id") VALUES (2013-03-08 13:37:51.000000 -05:00:00,userData,bEjseZl0si85ANN1njysOf+9,,) was aborted. Call getNextException to see the cause.
The problem is that the first three columns are flagged as date for timestamp, and string for the next 2, and the last 2 are integer, but are empty. I would expect to see it with this format:
INSERT INTO "dwh"."all_data" ("timestamp","action","session_id","src_user_id","src_community_id")
VALUES (?2013-03-08 13:37:51.000000 -05:00:00?,?userData?,?bEjseZl0si85ANN1njysOf+9?,NULL,NULL)
I don't have the single quotes around the first three columns, and then the word NULL is missing from the 4th and 5th columns.
I'm not sure how to correct this but it is very frustrating as I want to do more things with my data once I get it into the database.
Labels (3)
10 Replies
Anonymous
Not applicable
Author

Hey Did you found anything here, i am facing similar issue where the insert being sent without the quotes for strings and because of that Insert fails!

 


@sclccangmailcom wrote:
My table I'm trying to insert into is empty. There are no constraints on the table, not even primary key. When I attempt to insert the reformatted sql statement it goes in fine when connecting to the database correctly. How do I make Talend format the insert statement so that it will be accept by Postgresql?