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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
talendtester
Creator III
Creator III

Postgres - No results were returned by the query

I haven't done much with Talend and Postgresql in the past, so I need some help.
My job:
tPostgresqlConnection > tPostgresqlInput1 > tFileInputDelimited > tmap > tPostgresqlOutput
I am trying to:
1. DELETE ALL ROWS IN THE TABLE TO BE LOADED
2. INSERT ALL RECORDS FROM A FILE
ERROR:
Exception in component tPostgresqlInput
org.postgresql.util.PSQLException: No results were returned by the query.
My SQL works fine out side of Talend to delete the data in the table.
DELETE FROM myTable
Labels (2)
3 Replies
Anonymous
Not applicable

Hi
To execute a delete statement, you should use tpostgresqlRow component, tPostgresqlInput is used to select data from table. 
Anonymous
Not applicable

OK, no to delete records I suggest tPostgresqlOutput with table action Delete.
The key for delete the records are the schema column marked as key. No other columns are necessary.
Because you cannot select the records and delete them at the same time I suggest you select the records to delete and export them in a file and after that you read the file and delete them.
tPostgresqlInput -> tFileOutputDelimited
tFileInputDelimited -> tMap -> tPostgresqlOutput
talendtester
Creator III
Creator III
Author

Can I please get a screenshot of how you have your tPostgresqlOutput setup?
I am unable to get my tPostgresqlOutput to delete when I try table action Default & Delete, Truncate Table & Delete, Clear Table & Delete
The tpostgresqlRow successfully does the delete.