<?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: tWriteJSONField including &amp;quot;dummyloop&amp;quot; in output in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/tWriteJSONField-including-quot-dummyloop-quot-in-output/m-p/2364279#M128056</link>
    <description>&lt;P&gt;I figured out my problem, so here is my solution in case this helps anyone else. I wasn't truly setting up the json tree the way it needs to be set up. I was only doing a part of my structure and then using tJava to string together the rest of it. This post really helped me sort things out:&lt;/P&gt;&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/74800427/how-to-create-two-nested-array" alt="https://stackoverflow.com/questions/74800427/how-to-create-two-nested-array" target="_blank"&gt;https://stackoverflow.com/questions/74800427/how-to-create-two-nested-array&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Although my example isn't exactly like theirs, it gave me hints and through trial and error I figured out how to make it work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000sNjiUAAS.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/127954i3392F0241D19993F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000sNjiUAAS.png" alt="0695b00000sNjiUAAS.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000sNjxyAAC.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/129232iE6502D6B4508345E/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000sNjxyAAC.png" alt="0695b00000sNjxyAAC.png" /&gt;&lt;/span&gt;Whether I have a single result of multiple results it gives me the desired json structure that I'm looking for:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;{"name":"All_Clients_NDC_Load","workspaceId":"6532a0fd924af6792a34f982","description":"Loads NDC codes",&lt;/P&gt;&lt;P&gt;"steps":[&lt;/P&gt;&lt;P&gt;	{"name":"Step 1 - NDC Code Load","condition":"ALL_SUCCEEDED","taskIds":["65537425c995e015ec5ededf"]},&lt;/P&gt;&lt;P&gt;	{"name":"Step 2 - NDC Code Load","condition":"ALL_SUCCEEDED","taskIds":["65537425c995e015ec5ededg"]},&lt;/P&gt;&lt;P&gt;	{"name":"Step 3 - NDC Code Load","condition":"ALL_SUCCEEDED","taskIds":["65537425c995e015ec5ededh"]}&lt;/P&gt;&lt;P&gt;	]&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;{"name":"All_Clients_NDC_Load",&lt;/P&gt;&lt;P&gt;"workspaceId":"6532a0fd924af6792a34f982",&lt;/P&gt;&lt;P&gt;"description":"Loads NDC codes",&lt;/P&gt;&lt;P&gt;"steps":[&lt;/P&gt;&lt;P&gt;	{"name":"Step 1 - NDC Code Load","condition":"ALL_SUCCEEDED","taskIds":["65537425c995e015ec5ededf"]}]}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 16 Nov 2023 13:01:27 GMT</pubDate>
    <dc:creator>Papademuchos</dc:creator>
    <dc:date>2023-11-16T13:01:27Z</dc:date>
    <item>
      <title>tWriteJSONField including "dummyloop" in output</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tWriteJSONField-including-quot-dummyloop-quot-in-output/m-p/2364278#M128055</link>
      <description>&lt;P&gt;I have a job with steps very similar to this post:&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.talend.com/r/en-US/8.0/processing/twritejsonfield-tmap-trowgenerator-trowgenerator-converting-rows-to-json-array-to" target="_blank"&gt;https://help.talend.com/r/en-US/8.0/processing/twritejsonfield-tmap-trowgenerator-trowgenerator-converting-rows-to-json-array-to&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Records come in to tWriteJSONField and a json structure comes out.  When I have multiple records coming in, it works great!  Well, almost great.&lt;/P&gt;&lt;P&gt;However, when I have a single record coming in, the "dummyloop" is getting included in the json output.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's what it looks like with multiple rows being processed&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;	{"name":"Step 1 - Provider Load","condition":"ALL_SUCCEEDED","taskIds":["65537ffddb7ce63c035f90da"]},&lt;/P&gt;&lt;P&gt;	{"name":"Step 2 - Provider Network Load","condition":"ALL_SUCCEEDED","taskIds":["6553800006cc172dd0b1f95d"]},&lt;/P&gt;&lt;P&gt;	{"name":"Step 3 - Member Load","condition":"ALL_SUCCEEDED","taskIds":["65538002db7ce63c035f90dc"]}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's what it looks like with a single row being processed&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;	"dummyloop": {&lt;/P&gt;&lt;P&gt;		"name": "Step 1 - Code Load","condition": "ALL_SUCCEEDED","taskIds": ["65537425c995e015ec5ededf"]}&lt;/P&gt;&lt;P&gt;	}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why would tWriteJSONField behave differently for one record vs multiple?  Any ideas on how to fix this?  I could add in a replace function to get rid of the dummyloop, but it doesn't seem like I should have to do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any ideas.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 21:15:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tWriteJSONField-including-quot-dummyloop-quot-in-output/m-p/2364278#M128055</guid>
      <dc:creator>Papademuchos</dc:creator>
      <dc:date>2024-11-15T21:15:19Z</dc:date>
    </item>
    <item>
      <title>Re: tWriteJSONField including "dummyloop" in output</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tWriteJSONField-including-quot-dummyloop-quot-in-output/m-p/2364279#M128056</link>
      <description>&lt;P&gt;I figured out my problem, so here is my solution in case this helps anyone else. I wasn't truly setting up the json tree the way it needs to be set up. I was only doing a part of my structure and then using tJava to string together the rest of it. This post really helped me sort things out:&lt;/P&gt;&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/74800427/how-to-create-two-nested-array" alt="https://stackoverflow.com/questions/74800427/how-to-create-two-nested-array" target="_blank"&gt;https://stackoverflow.com/questions/74800427/how-to-create-two-nested-array&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Although my example isn't exactly like theirs, it gave me hints and through trial and error I figured out how to make it work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000sNjiUAAS.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/127954i3392F0241D19993F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000sNjiUAAS.png" alt="0695b00000sNjiUAAS.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000sNjxyAAC.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/129232iE6502D6B4508345E/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000sNjxyAAC.png" alt="0695b00000sNjxyAAC.png" /&gt;&lt;/span&gt;Whether I have a single result of multiple results it gives me the desired json structure that I'm looking for:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;{"name":"All_Clients_NDC_Load","workspaceId":"6532a0fd924af6792a34f982","description":"Loads NDC codes",&lt;/P&gt;&lt;P&gt;"steps":[&lt;/P&gt;&lt;P&gt;	{"name":"Step 1 - NDC Code Load","condition":"ALL_SUCCEEDED","taskIds":["65537425c995e015ec5ededf"]},&lt;/P&gt;&lt;P&gt;	{"name":"Step 2 - NDC Code Load","condition":"ALL_SUCCEEDED","taskIds":["65537425c995e015ec5ededg"]},&lt;/P&gt;&lt;P&gt;	{"name":"Step 3 - NDC Code Load","condition":"ALL_SUCCEEDED","taskIds":["65537425c995e015ec5ededh"]}&lt;/P&gt;&lt;P&gt;	]&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;{"name":"All_Clients_NDC_Load",&lt;/P&gt;&lt;P&gt;"workspaceId":"6532a0fd924af6792a34f982",&lt;/P&gt;&lt;P&gt;"description":"Loads NDC codes",&lt;/P&gt;&lt;P&gt;"steps":[&lt;/P&gt;&lt;P&gt;	{"name":"Step 1 - NDC Code Load","condition":"ALL_SUCCEEDED","taskIds":["65537425c995e015ec5ededf"]}]}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2023 13:01:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tWriteJSONField-including-quot-dummyloop-quot-in-output/m-p/2364279#M128056</guid>
      <dc:creator>Papademuchos</dc:creator>
      <dc:date>2023-11-16T13:01:27Z</dc:date>
    </item>
  </channel>
</rss>

