Filed Json Cassandra db to multiples fields postgresql

Four Stars

Filed Json Cassandra db to multiples fields postgresql

I need to extract the data from a field saved in the json format of the cassandra database and save this data separately in the postgresql database. This is a field in json format where all the information in the items of an order is saved. Can anyone help me do this?

Employee

Re: Filed Json Cassandra db to multiples fields postgresql

Hi,

 

    Did you try tExtractJSONFields component to extract the data?

 

    Please refer the below post to get some idea. If you are still stuck, please provide with sample data and expected output and we can give it a try.

 

https://community.talend.com/t5/Design-and-Development/how-to-convert-json-data-to-csv-file/m-p/1455...

 

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: Filed Json Cassandra db to multiples fields postgresql

Thanks Nikhil Thampi, 

 

My json field content is 

{  
   "purchasedItems":{  
      "bundle":"false",
      "classification":"1",
      "costCenter":null,
      "createdAt":"2019-03-28T18:41:38.839Z",...continue

 

My query json in tExtractJsonFields is

 

image.png

But it does not work, what am I doing wrong?

 

Employee

Re: Filed Json Cassandra db to multiples fields postgresql

Hi,

 

    Assuming your entire JSON is in a Single String as shown below, I was able to get the output

 

{    "purchasedItems":{       "bundle":"false",      "classification":"1",      "costCenter":null,      "createdAt":"2019-03-28T18:41:38.839Z"	 }}

image.png

 

image.png

 

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

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

Put Massive Amounts of Data to Work

Learn how to make your data more available, reduce costs and cut your build time

Watch Now

How OTTO Utilizes Big Data to Deliver Personalized Experiences

Read about OTTO's experiences with Big Data and Personalized Experiences

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog