Talend Connect
Virtual Summit
JOIN US!
And visit the Customer
& Community Lounge.
May 27-28, wherever you are.

Import binary files into Postgres Database

Highlighted
One Star

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?
Highlighted

Re: Import binary files into Postgres Database

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.
Highlighted
One Star

Re: Import binary files into Postgres Database

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)
Highlighted
Community Manager

Re: Import binary files into Postgres Database

Hi
You can find a similar request in topic:
http://www.talendforge.org/forum/viewtopic.php?id=1753
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog