Extract JSON from MySQL blob field

Highlighted
One Star

Extract JSON from MySQL blob field

Hello,
I'm trying to create a job that will extract JSON from a blob field in MySQL, then create columns in another database from the JSON data. I cant figure out how to get the JSON out of the object that is returned from the database. Is there a component I can use to parse the JSON out of the row returned from the DB?
Thanks.
Seventeen Stars

Re: Extract JSON from MySQL blob field

I would not use a BLOB field, better using a CLOB field. CLOBs can be retrieved as normal varchar fields.
One Star

Re: Extract JSON from MySQL blob field

I would not use a BLOB field, better using a CLOB field. CLOBs can be retrieved as normal varchar fields.
One Star

Re: Extract JSON from MySQL blob field

I would not use a BLOB field, better using a CLOB field. CLOBs can be retrieved as normal varchar fields.

Oops..
Assuming I don't have a choice, what can I do to extract the JSON?
Community Manager

Re: Extract JSON from MySQL blob field

I would not use a BLOB field, better using a CLOB field. CLOBs can be retrieved as normal varchar fields.

Oops..
Assuming I don't have a choice, what can I do to extract the JSON?
Read the Blob data from Mysql to a json file first, and then use a tFileInputJson to read the json file, refer to this topic:
http://www.talendforge.org/forum/viewtopic.php?id=8633
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Extract JSON from MySQL blob field

Thanks, Shong.
We were able to get it into a file by simply connecting it to a tfileoutputdelimited component. Each json object is on a new line. When we try to process this it tries to read the entire file instead of each line. Is this not the right way to do it? Would your previous suggestion be a better approach?

15TH OCTOBER, COUNTY HALL, LONDON

Join us at the Community Lounge.

Register Now

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

Why Companies Move to the Cloud: 7 Success Stories

Learn how and why companies are moving to the Cloud

Read Now