Import binary files into Postgres Database

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?

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.
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)
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 GARNER 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

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download