Search code examples
postgresqlavro

How to write blob data in avro to postgres sql


We are trying to migrate data from oracle into postgres. We are extracting data in avro format from oracle and writing to postgres.

Currently we are converting avro to CSV and writing to postgres but the issue comes when data is in blob format.

We are using psql copy to write the data.

Is there any way we can write avro file directly to postgres using psql or any other utility? We are ok with extracting data in AVRO or CSV format.


Solution

  • One option is to use GoldenGate (or maybe Debezium) to export Oracle to Kafka in Avro, then run JDBC sink from Kafka Connect to Postgres. That would map Avro types to Postgres types, though, not store binary avro as blobs