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.
Highlighted
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.
Highlighted
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.
Highlighted
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?
Highlighted
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
Highlighted
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?

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