<?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: Dynamic Filename  in tAdvancedFileOutputXML - next iterations returns null from variables in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Dynamic-Filename-in-tAdvancedFileOutputXML-next-iterations/m-p/2231707#M21915</link>
    <description>&lt;P&gt;Thanks vapukov!&lt;/P&gt;</description>
    <pubDate>Fri, 18 Jan 2019 01:37:48 GMT</pubDate>
    <dc:creator>jerownimow</dc:creator>
    <dc:date>2019-01-18T01:37:48Z</dc:date>
    <item>
      <title>Dynamic Filename  in tAdvancedFileOutputXML - next iterations returns null from variables</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Dynamic-Filename-in-tAdvancedFileOutputXML-next-iterations/m-p/2231705#M21913</link>
      <description>&lt;P&gt;&lt;FONT size="2"&gt;Hi Folks,&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="2"&gt;Here's my code:&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Code flow.PNG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M0uC.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/135027i549FCFDB4B0DECEA/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M0uC.png" alt="0683p000009M0uC.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="2"&gt;And I have two problems:&lt;/FONT&gt;&lt;/P&gt; 
&lt;OL&gt; 
 &lt;LI&gt;&lt;FONT size="2"&gt;On the first flow, the first iteration returns null for the variable that will be used on the dynamic filename.&lt;/FONT&gt;&lt;/LI&gt; 
 &lt;LI&gt;&lt;FONT size="2"&gt;On the second flow, the variables will be used on the other XML output so that it will be one file, the problem is, the filename which is stored in context will already be replaced when the other XML files will be generated.&lt;/FONT&gt;&lt;/LI&gt; 
&lt;/OL&gt; 
&lt;P&gt;&lt;FONT size="2"&gt;For the first flow:&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="2"&gt;Inside tmap I have the ff. fields:&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Fields.png" style="width: 151px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M0uH.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/149086i21E79AB9996F7C58/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M0uH.png" alt="0683p000009M0uH.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;FONT size="2"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="2"&gt;&lt;SPAN&gt;Inside tJava:&amp;nbsp;context.Filename_Suffix = AssetDocusignTags.Filename_Suffix;&lt;BR /&gt;tJavaRow is only pass thru,&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="2"&gt;&lt;SPAN&gt;&lt;SPAN&gt;and on&amp;nbsp;tAdvancedFileOutputXML, I have the File Name parameter as:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt; 
&lt;PRE&gt;&lt;FONT size="2"&gt;context.directory+"File_"+context.Filename_Suffix+".xml"&lt;/FONT&gt;&lt;/PRE&gt; 
&lt;P&gt;&lt;FONT size="2"&gt;what is happening is that on the first file the&amp;nbsp;context.Filename_Suffix returns blank, second file has the supposed to be suffix of the first. But when I print the context it returns as expected which is why I wondered why it doesn't work&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="2"&gt;Example:&lt;/FONT&gt;&lt;/P&gt; 
&lt;PRE&gt;&lt;FONT size="2"&gt;--Current:
file1: filename_.xml /*appears to be null*/ 
file2: filename_geronimo.xml
--Expected:
file1: filename_geronimo.xml
file2: filename_ronima.xml&lt;/FONT&gt;&lt;/PRE&gt; 
&lt;P&gt;&lt;FONT size="2"&gt;the content is correct but the dynamic filename isn't. so basically, the expected output should be 1 xml file per row. After the creation of the file for the first row, then the next row should be processed and create an xml file consequently.&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="2"&gt;For the second flow, I have only one field which is a parameter to be used on tRestClient, the problem is on the other 3 tAdvancedFileOutputXML.&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="2"&gt;How can I handle the synchronous assigning of variables on those files so that they will append? With the current design, what had set last on the context variable will be the one to be fetched on the second order of the tMap.&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;Hoping for your immediate response. Your help will be very much appreciated! Thank you!&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 07:20:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Dynamic-Filename-in-tAdvancedFileOutputXML-next-iterations/m-p/2231705#M21913</guid>
      <dc:creator>jerownimow</dc:creator>
      <dc:date>2024-11-16T07:20:17Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Filename  in tAdvancedFileOutputXML - next iterations returns null from variables</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Dynamic-Filename-in-tAdvancedFileOutputXML-next-iterations/m-p/2231706#M21914</link>
      <description>&lt;P&gt;Output component initialized before tMap and tJava, so when full filename prepared - suffix is really null&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;solution - tFlowToIterate connected by trigger OnComponentOk to next subjob&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thiw will use already prepared dynamic name for each iteration, and output component would be initialized each iteration with new filename&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Nov 2018 01:14:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Dynamic-Filename-in-tAdvancedFileOutputXML-next-iterations/m-p/2231706#M21914</guid>
      <dc:creator>vapukov</dc:creator>
      <dc:date>2018-11-09T01:14:07Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Filename  in tAdvancedFileOutputXML - next iterations returns null from variables</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Dynamic-Filename-in-tAdvancedFileOutputXML-next-iterations/m-p/2231707#M21915</link>
      <description>&lt;P&gt;Thanks vapukov!&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jan 2019 01:37:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Dynamic-Filename-in-tAdvancedFileOutputXML-next-iterations/m-p/2231707#M21915</guid>
      <dc:creator>jerownimow</dc:creator>
      <dc:date>2019-01-18T01:37:48Z</dc:date>
    </item>
  </channel>
</rss>

