Getting backslashes in tFileOutputJson output

Eight Stars

Getting backslashes in tFileOutputJson output

Hi Team,

While i am trying to export json data to .json file using tFileOutputJson component every key and values are enclosing in backslashes. I am trying to export multiple json objects in one json file. Can any one help me on this.

Ex : {\"ID\":\"D722CAB9C24129B1\"}

 

Thanks,

Bharath.

Nine Stars

Re: Getting backslashes in tFileOutputJson output

Please provide more details on your requirement.

 

Regards,

Veeru Boppudi
Eight Stars

Re: Getting backslashes in tFileOutputJson output

Hi @vboppudi,

 

We have to export data from table to .json file in json format. We have tried to parse and export it but while exporting data to Json file we are getting backslashes for each key and values in json.

Below is the sample record from file.

Ex : {\"ID\":\"C24129B121\",\"CUSTOMER_ID\":\"Null\"}

 

Thanks,

Bharath.

Nine Stars

Re: Getting backslashes in tFileOutputJson output

Can you please provide input data as well if possible.

Regards,

Veeru Boppudi
Eight Stars

Re: Getting backslashes in tFileOutputJson output

Hi @vboppudi,

 

Input data is as follows

 

ID,CUSTOMER_ID

C24129B121,Null

C2412AB121,AB2324

C6556JKNS,SBH6844

 

Thanks,

Bharath.

Nine Stars

Re: Getting backslashes in tFileOutputJson output

Hi,

Are you looking for the following out put?

 

Json.PNG

 

Can you please post you job if possible?

Regards,

Veeru Boppudi
Four Stars

Re: Getting backslashes in tFileOutputJson output

Hello Everyone,

 

i am interested by the answer. I have same issue.

 

Here is my job and the json file in output.

 

2018-08-06_13h34_52.png2018-08-06_13h37_15.png

 

My second problem is , i still have the "root" named Json in the file.

 

Or i did check "remove root node" in my tWriteJSONField

 

thank you guys.

 

 

Four Stars

Re: Getting backslashes in tFileOutputJson output

Hi all,

 

Has anyone managed to resolve the issues?

 

I am using Talend Real-time Big Data Platfrom 6.4.1 (Build 20170623_1246) and 7.1.1 (20181026_1147), and experiencing exactly same issues on both versions.

 

- escape character backslash is included for every double quotation used for keys and values

- the option "Remove root node" in tWriteJSONField is not working in combination with tFileOutputJSON

 

The issue is not given when logging from tWriteJSONField into tLogRow, and writing directly from tWriteJSONField to tFileOutputDelimited.

I need to use tFileOutputJSON to put everything into a JSON array brackets.

 

 

Four Stars

Re: Getting backslashes in tFileOutputJson output

Hi all,

 

Has anyone managed to resolve the issues?

 

I am using Talend Real-time Big Data Platfrom 6.4.1 (Build 20170623_1246) and 7.1.1 (20181026_1147), and experiencing exactly same issues on both versions.

 

- escape character backslash is included for every double quotation used for keys and values

- the option "Remove root node" in tWriteJSONField is not working in combination with tFileOutputJSON

 

The issue is not given when logging from tWriteJSONField into tLogRow, and writing directly from tWriteJSONField to tFileOutputDelimited.

I need to use tFileOutputJSON to put everything into a JSON array brackets.

 

Please let me know.

Thanks

Four Stars

Re: Getting backslashes in tFileOutputJson output

Hi all,

 

Has anyone managed to resolve the issues?

 

I am using Talend Real-time Big Data Platfrom 6.4.1 (Build 20170623_1246) and 7.1.1 (20181026_1147), and experiencing exactly same issues on both versions.

 

- escape character backslash is included for every double quotation used for keys and values

- the option "Remove root node" in tWriteJSONField is not working in combination with tFileOutputJSON

 

The issue is not given when logging from tWriteJSONField into tLogRow, and writing directly from tWriteJSONField to tFileOutputDelimited.

I need to use tFileOutputJSON to put everything into a JSON array brackets.

 

Please let me know.

 

Thanks

Tutorial

Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.