Unable to transfer blob from Oracle to Mysql using tDBoutputBulk

Four Stars

Unable to transfer blob from Oracle to Mysql using tDBoutputBulk

Hi

I'm trying as an exercise to understand the behaviour of components  to transfer blob from Oracle to Mysql using tDBoutputBulk.

     ┌──────┐          ┌─────────────┐
     │Oracle│          │tDbOutputBulk│
     └──┬───┘          └──────┬──────┘
        │  dump Oracle Table  │       
        │ ───────────────────>│       
     ┌──┴───┐          ┌──────┴──────┐
     │Oracle│          │tDbOutputBulk│
     └──────┘          └─────────────┘

When it saves the row to  the file , the blob is transferred as a string like this: 

 

<startlob>oracle.sql.BLOB@20a25f66<endlob>

 

And not like a Base64 cell block.

 

I tried to use either the oracle or mysql format but the result is similar.

When I try to import directly to a mysql DB it runs fine and it transfer the blob correctly in the other DB

Where is the blob ?

Thank you

Paolo

Employee

Re: Unable to transfer blob from Oracle to Mysql using tDBoutputBulk

Hi,

 

    Could you please go through the below community posts and let us know whether they have helped you?

 

https://community.talend.com/t5/Design-and-Development/resolved-insert-blob-in-Oracle-component/td-p...

 

https://community.talend.com/t5/Design-and-Development/resolved-Create-file-from-a-blob-input-oracle...

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved :-)

Four Stars

Re: Unable to transfer blob from Oracle to Mysql using tDBoutputBulk

Hi

thank you very much for the reply.

The first solution does not solve the problem, the second use another component that save only the blob, but i'm unable to make it work.

However  the output bulk is needed to reload the table  into another DB. 

 

I think the error come from an incorrect cast in generated java:

if (row1.T_LOGS_BIN != null) {

row_tDBOutputBulk_1[10] = String
.valueOf(row1.T_LOGS_BIN);

}

it emit something like this:

oracle.sql.BLOB@351f2244

 

that seems the pointer representation to the object and not the object content.

 

I use the latest TOS_DI

 

Thank you

Paolo

 

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