tExtractJsonFields Cannot determine next state

One Star

tExtractJsonFields Cannot determine next state

Hi Talend,
I have a Json response that I've validated is correct, but the component tExtractJsonFields cannot parse it.  In the execution log window, the message I'm getting is 'Cannot determine next state'.  Below is a sample of the JSON.
{"total_rows":95371,"offset":6700,"rows":,"context":{"sandbox":true},"_id":"8832845c-12eb-4065-adec-05feb6fe1d3a","data":{"callCentreTransaction":true,"language":"en-US"},"metadata":{"deletionTime":null,"deleted":false,"updatedAt":"2014-06-09T00:00:01.046410Z","schemaVersion":1,"type":"Order","createdAt":"2014-06-08T23:59:56.190716Z"}},"doc":{"_id":"8832845c-12eb-4065-adec-05feb6fe1d3a","_rev":"5-96be926e57e12267d26bab99675e0848","status":"complete","orderType":"BUY","docType":"order","application":"/apps/1fd317e7-c81d-4859-a437-d0e687d41ece","updates":,"context":{"sandbox":true},"data":{"callCentreTransaction":true,"language":"en-US"},"metadata":{"deletionTime":null,"deleted":false,"updatedAt":"2014-06-09T00:00:01.046410Z","schemaVersion":1,"type":"Order","createdAt":"2014-06-08T23:59:56.190716Z"},"_attachments":{"ver-2014-06-08T23:59:42.075893":{"content_type":"application/json","revpos":4,"digest":"md5-x+8gIccqrIJG9Au5oFiHwA==","length":954,"stub":true},"ver-2014-06-08T23:59:43.393888":{"content_type":"application/json","revpos":5,"digest":"md5-QfnDJfdENKh3cPL2MPq0AA==","length":1176,"stub":true},"ver-2014-06-08T23:59:41.319266":{"content_type":"application/json","revpos":3,"digest":"md5-Lb9GRVZ22dOYHpD5dDDRnw==","length":733,"stub":true},"ver-2014-06-08T23:59:56.190716":{"content_type":"application/json","revpos":2,"digest":"md5-AavA3cATHjO9YJPnrzOgdg==","length":501,"stub":true}}}}]}
I'm not sure why the component cannot read the JSON.  Can you asssist?  Thanks very much.
Jerry
One Star

Re: tExtractJsonFields Cannot determine next state

Hi Jerry
Would you please elaborate what output you wants.Seems your Xpath query is not correct.
Follow these post,it will resolve your issue,this is common error when your json have array's.
https://help.talend.com/search/all?query=tExtractJSONFields&content-lang=en
https://talendforge.org/forum/viewtopic.php?id=33150
One Star

Re: tExtractJsonFields Cannot determine next state

Hi Talend Team,
Please see screen shot of my XPath query.  I only put in one mapping to keep things simple.  Originally, i wanted to use the component tFileJsonInput but I couldn't generate a schema definition.  The message I kept getting back was 'File is not found or json format is not correct'.  Thanks very much.

Jerry
One Star dbh
One Star

Re: tExtractJsonFields Cannot determine next state

I encountered the same problem.  I switched from XPath to using JsonPath and the errors went away.
Four Stars

Re: tExtractJsonFields Cannot determine next state

JsonPath work for me also  (instead of XPath )

 

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

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

Talend Integration with Databricks

Take a look at this video about Talend Integration with Databricks

Watch Now