<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: JSON to CSV and csv to BigQuery in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/JSON-to-CSV-and-csv-to-BigQuery/m-p/2365670#M129253</link>
    <description>If the record:&lt;BR /&gt;&lt;PRE&gt;1086,134,2015-05-21T19:16:45Z,10,Email Test.Subject Line Test,{"attributes":{"name":"Device","value":"iPhone"}}&lt;/PRE&gt;&lt;BR /&gt;If the record is somewhere in the flow, you can store it for later usage into globalMap:&lt;BR /&gt;&lt;PRE&gt;globalMap.put("myCSVWithJSONFile",myCSVFileOrLine);&lt;/PRE&gt;&lt;BR /&gt;Even without that or later you can issue simply in some tJava or tJavaRow:&lt;BR /&gt;&lt;PRE&gt;String newstring = String.replaceAll("\"","\\\"");&lt;/PRE&gt;&lt;BR /&gt;If the there is file on file system you can issue this:&lt;BR /&gt;&lt;PRE&gt;Path path = Paths.get("myCSVFileWithJSON");&lt;BR /&gt;Charset charset = StandardCharsets.UTF_8;&lt;BR /&gt;String content = new String(Files.readAllBytes(path), charset);&lt;BR /&gt;content = content.replaceAll("\"", "\\\"");&lt;BR /&gt;Files.write(path, content.getBytes(charset));&lt;/PRE&gt;&lt;BR /&gt;You are still in Java world so you can use "anything".&lt;BR /&gt;Best regards,&lt;BR /&gt;Ladislav</description>
    <pubDate>Wed, 01 Jul 2015 17:39:01 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-07-01T17:39:01Z</dc:date>
    <item>
      <title>JSON to CSV and csv to BigQuery</title>
      <link>https://community.qlik.com/t5/Talend-Studio/JSON-to-CSV-and-csv-to-BigQuery/m-p/2365669#M129252</link>
      <description>Hi team, 
&lt;BR /&gt;First of all ingesting csv to BigQuery is due to appending option is available only with csv and cannot merge number of json files into single JSON.&amp;nbsp; 
&lt;BR /&gt;Once tFileFetch is complete, it downloads JSON. I am converting it to csv file inorder to append iterative data. I believe appending not allowed in JSON. My target would be Big Query and Json converted csv has record like this 
&lt;BR /&gt; 
&lt;PRE&gt;1086,134,2015-05-21T19:16:45Z,10,Email Test.Subject Line Test,{"attributes":{"name":"Device","value":"iPhone"}}&lt;/PRE&gt; 
&lt;BR /&gt;6th column&amp;nbsp;{"attributes":{"name":"Device","value":"iPhone"}} it being taken as&amp;nbsp;6th column&amp;nbsp;{"attributes":{"name":"Device" and 7th column&amp;nbsp;"value":"iPhone"}}. Also since it has "" , big query couldnt ingest data which has "", how to remove "" in CSV file? and how to apply escape char to ""</description>
      <pubDate>Sat, 16 Nov 2024 11:09:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/JSON-to-CSV-and-csv-to-BigQuery/m-p/2365669#M129252</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T11:09:48Z</dc:date>
    </item>
    <item>
      <title>Re: JSON to CSV and csv to BigQuery</title>
      <link>https://community.qlik.com/t5/Talend-Studio/JSON-to-CSV-and-csv-to-BigQuery/m-p/2365670#M129253</link>
      <description>If the record:&lt;BR /&gt;&lt;PRE&gt;1086,134,2015-05-21T19:16:45Z,10,Email Test.Subject Line Test,{"attributes":{"name":"Device","value":"iPhone"}}&lt;/PRE&gt;&lt;BR /&gt;If the record is somewhere in the flow, you can store it for later usage into globalMap:&lt;BR /&gt;&lt;PRE&gt;globalMap.put("myCSVWithJSONFile",myCSVFileOrLine);&lt;/PRE&gt;&lt;BR /&gt;Even without that or later you can issue simply in some tJava or tJavaRow:&lt;BR /&gt;&lt;PRE&gt;String newstring = String.replaceAll("\"","\\\"");&lt;/PRE&gt;&lt;BR /&gt;If the there is file on file system you can issue this:&lt;BR /&gt;&lt;PRE&gt;Path path = Paths.get("myCSVFileWithJSON");&lt;BR /&gt;Charset charset = StandardCharsets.UTF_8;&lt;BR /&gt;String content = new String(Files.readAllBytes(path), charset);&lt;BR /&gt;content = content.replaceAll("\"", "\\\"");&lt;BR /&gt;Files.write(path, content.getBytes(charset));&lt;/PRE&gt;&lt;BR /&gt;You are still in Java world so you can use "anything".&lt;BR /&gt;Best regards,&lt;BR /&gt;Ladislav</description>
      <pubDate>Wed, 01 Jul 2015 17:39:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/JSON-to-CSV-and-csv-to-BigQuery/m-p/2365670#M129253</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-07-01T17:39:01Z</dc:date>
    </item>
  </channel>
</rss>

