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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
_AnonymousUser
Specialist III
Specialist III

Import binary files into Postgres Database

I need to migrate binary files (pdfs, txt,...) from disk into a Postgres Database (bytea). How does this work, is it even possible?
Labels (2)
3 Replies
Anonymous
Not applicable

You load the file into the database using lo_import(), and retrieve it from the database using lo_export().
in the advanced settings of your postgres output, under additional columns, replace your blob column with lo_import(?)
the data value for this column should be the file name you want to insert to the blob.
_AnonymousUser
Specialist III
Specialist III
Author

as I know lo_import() is only for oid
for bytea you need a JDBC PreparedStatement, right?
I thought there is a easier way in talend to do this (in combination with tmap)
Anonymous
Not applicable

Hi
You can find a similar request in topic:
https://community.talend.com/t5/Design-and-Development/resolved-File-into-BLOB/td-p/67476
Best regards
Shong