<?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: From tFileFetch (delimited file) to JSON in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/From-tFileFetch-delimited-file-to-JSON/m-p/2364578#M128302</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Could you please elaborate your case with an example with expected json output values?&lt;/P&gt;
&lt;P&gt;Best regards&lt;/P&gt;
&lt;P&gt;Sabrina&lt;/P&gt;</description>
    <pubDate>Wed, 20 Dec 2017 07:37:12 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-12-20T07:37:12Z</dc:date>
    <item>
      <title>From tFileFetch (delimited file) to JSON</title>
      <link>https://community.qlik.com/t5/Talend-Studio/From-tFileFetch-delimited-file-to-JSON/m-p/2364577#M128301</link>
      <description>&lt;P&gt;I'm using tFileFetch to pull a .txt file in the following format. (The column names&amp;nbsp;will not be known ahead of time)&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;Employee SSN|Member Number|Patient Date of Birth|Patient Sex|Relationship to Employee|Product Code|Claim Type|Claim Number|Line Number|Adjustment Number|Adjustment Type|Bill Type Code|Principal Diagnosis|Secondary Diagnosis|Procedure Code Indicator|Procedure Code 1|Procedure Code Modifier 1|Place of Service|Filler_1|Paid Date|First Date of Service|Last Date of Service|Discharge Status|Provider Tax ID (unscrambled)|Provider Tax ID|Provider Zip Code|Filler|Servicing Provider Type|In/Out-of-Plan Indicator|Capitated Service Indicator|Paid Amount|Copay|Deductible|Coinsurance|Medicare Indicator|Account Number|Subgroup Number|Department Number|Package Number|Person ID|COB|COB Code|Employee Date of Birth|Employee Sex|Employee Coverage Type|Employee Zip Code|Billed Charges|Excluded Amount|Excluded Reason Code|Undiscounted Covered Amount|Discounted Covered Amount|Tertiary Diagnosis|PCP Indicator|PCP Tax ID|PCP Zip Code|Facility Place of Service Code|Secondary Procedure Code|Secondary Procedure Code Indicator|Provider Specialty Code|Quantity of Services|Dx Code 4|Dx Code 5|Dx Code 6|Dx Code 7|Dx Code 8|First name|Middle name|Last name|Employment Status|Primary Street|Secondary Street|City|State|Postal code|Home Phone|Work Phone|Units
333221548      |Z6097          |07251978|F|76   ||||||||||||||||07282017|07282017||||||||||||||||||Z6097                                     ||||||37209|725.68         ||||||||53719||||9         |||||||Ambthree||Patron||123 my street||NASHVILLE|43|37209|615-234-5678||
333221548      |Z6097          |07251978|F|76   ||||||||||||||||07282017|07282017||||||||||||||||||Z6097                                     ||||||37209|725.68         ||||||||53719||||9         |||||||Ambthree||Patron||123 my street||NASHVILLE|43|37209|615-234-5678||&lt;/PRE&gt; 
&lt;P&gt;I need a way to convert this to JSON data. Any help would be appreciated.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 08:57:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/From-tFileFetch-delimited-file-to-JSON/m-p/2364577#M128301</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T08:57:25Z</dc:date>
    </item>
    <item>
      <title>Re: From tFileFetch (delimited file) to JSON</title>
      <link>https://community.qlik.com/t5/Talend-Studio/From-tFileFetch-delimited-file-to-JSON/m-p/2364578#M128302</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Could you please elaborate your case with an example with expected json output values?&lt;/P&gt;
&lt;P&gt;Best regards&lt;/P&gt;
&lt;P&gt;Sabrina&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2017 07:37:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/From-tFileFetch-delimited-file-to-JSON/m-p/2364578#M128302</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-20T07:37:12Z</dc:date>
    </item>
    <item>
      <title>Re: From tFileFetch (delimited file) to JSON</title>
      <link>https://community.qlik.com/t5/Talend-Studio/From-tFileFetch-delimited-file-to-JSON/m-p/2364579#M128303</link>
      <description>&lt;P&gt;I ended up parsing the file with the following:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;while ((line = br.readLine()) != null) {
	JSONObject item = new JSONObject();
	
	// gank the headers and move on
	if (headers == null) {
		headers = line.split(delimiter, KEEP_EMPTY_STRINGS);
		continue;
	}
	
	// build JSON
	String[] data = line.split(delimiter, KEEP_EMPTY_STRINGS);
	for(int i = 0; i &amp;lt; headers.length; i++) {
		item.put(headers[i], data[i].trim());
	}
	
	items.add(item);
}     

output_row.body = items.toString();&lt;/PRE&gt;</description>
      <pubDate>Wed, 20 Dec 2017 11:29:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/From-tFileFetch-delimited-file-to-JSON/m-p/2364579#M128303</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-20T11:29:58Z</dc:date>
    </item>
    <item>
      <title>Re: From tFileFetch (delimited file) to JSON</title>
      <link>https://community.qlik.com/t5/Talend-Studio/From-tFileFetch-delimited-file-to-JSON/m-p/2364580#M128304</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Thanks for sharing your solution with us and marked your solution as accepted.&lt;/P&gt;
&lt;P&gt;Best regards&lt;/P&gt;
&lt;P&gt;Sabrina&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2017 03:37:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/From-tFileFetch-delimited-file-to-JSON/m-p/2364580#M128304</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-21T03:37:48Z</dc:date>
    </item>
  </channel>
</rss>

