Unable to transfer blob from Oracle to Mysql using tDBoutputBulk

Highlighted
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

Highlighted
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 :-)

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

Part 2 of a series on Context Variables

Blog

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