<?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: replace a value in string in file with diferent row schema in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/replace-a-value-in-string-in-file-with-diferent-row-schema/m-p/2274130#M50891</link>
    <description>You should have the expected result using a tMap to join both files with a left outer join.
&lt;BR /&gt;Use a tFileInputDelimited to read file1 (with schema zero;column1;column2;column3;column4).
&lt;BR /&gt;Connect it to the tMap as the main row.
&lt;BR /&gt;Use a tFileInputDelimited to read file2 and connect it to a 1rst tMap to add a new column (say zero) initialized to "00".
&lt;BR /&gt;Connect this tMap to the 1rst one and base the left outer join on columns 00 and column 2.
&lt;BR /&gt;On the right part of the tMap, use the following expression for column3:
&lt;BR /&gt;row2.column3 == null ? row1.column3 : row2.column3
&lt;BR /&gt;In this expression, row1 is for main row and row2 is for lookup. Adapt the names depending on what they are in your job.</description>
    <pubDate>Mon, 10 Sep 2018 20:59:38 GMT</pubDate>
    <dc:creator>TRF</dc:creator>
    <dc:date>2018-09-10T20:59:38Z</dc:date>
    <item>
      <title>replace a value in string in file with diferent row schema</title>
      <link>https://community.qlik.com/t5/Talend-Studio/replace-a-value-in-string-in-file-with-diferent-row-schema/m-p/2274129#M50890</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i need some help, i have a input file1 like this:&lt;/P&gt;&lt;P&gt;00;column1;column2;column3;&lt;/P&gt;&lt;P&gt;11;column1;column2;&lt;/P&gt;&lt;P&gt;22;column1;column2;column3;column4;&lt;/P&gt;&lt;P&gt;33;column1;column2;column3;column4;column5;&lt;/P&gt;&lt;P&gt;00;column1;column2;column3;&lt;/P&gt;&lt;P&gt;11;column1;column2;&lt;/P&gt;&lt;P&gt;22;column1;column2;column3;column4;&lt;/P&gt;&lt;P&gt;33;column1;column2;column3;column4;column5;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have other file2 with column1;column2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i need to replace the value of column3 on the lines that start with 00 doing a join between the 2 files where&lt;/P&gt;&lt;P&gt;file1.column2=file2.column2&lt;/P&gt;&lt;P&gt;maintaining the same lines of file1 at the end with the replaced value- final file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i thought of using the tfileinputfullrow - file1,thashmap-file 2 extracting and treplace but who can i do a join ? can somebody help me with this issue?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Sep 2018 19:47:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/replace-a-value-in-string-in-file-with-diferent-row-schema/m-p/2274129#M50890</guid>
      <dc:creator>uzix</dc:creator>
      <dc:date>2018-09-10T19:47:46Z</dc:date>
    </item>
    <item>
      <title>Re: replace a value in string in file with diferent row schema</title>
      <link>https://community.qlik.com/t5/Talend-Studio/replace-a-value-in-string-in-file-with-diferent-row-schema/m-p/2274130#M50891</link>
      <description>You should have the expected result using a tMap to join both files with a left outer join.
&lt;BR /&gt;Use a tFileInputDelimited to read file1 (with schema zero;column1;column2;column3;column4).
&lt;BR /&gt;Connect it to the tMap as the main row.
&lt;BR /&gt;Use a tFileInputDelimited to read file2 and connect it to a 1rst tMap to add a new column (say zero) initialized to "00".
&lt;BR /&gt;Connect this tMap to the 1rst one and base the left outer join on columns 00 and column 2.
&lt;BR /&gt;On the right part of the tMap, use the following expression for column3:
&lt;BR /&gt;row2.column3 == null ? row1.column3 : row2.column3
&lt;BR /&gt;In this expression, row1 is for main row and row2 is for lookup. Adapt the names depending on what they are in your job.</description>
      <pubDate>Mon, 10 Sep 2018 20:59:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/replace-a-value-in-string-in-file-with-diferent-row-schema/m-p/2274130#M50891</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2018-09-10T20:59:38Z</dc:date>
    </item>
    <item>
      <title>Re: replace a value in string in file with diferent row schema</title>
      <link>https://community.qlik.com/t5/Talend-Studio/replace-a-value-in-string-in-file-with-diferent-row-schema/m-p/2274131#M50892</link>
      <description>&lt;P&gt;hi TRF,&lt;/P&gt;&lt;P&gt;thanks you for your help,&amp;nbsp;&lt;/P&gt;&lt;P&gt;a question, will the schema of the lines be preserved?&lt;/P&gt;&lt;P&gt;"00;column1;column2;column3;&lt;BR /&gt;11;column1;column2;&lt;BR /&gt;22;column1;column2;column3;column4;"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Sep 2018 21:27:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/replace-a-value-in-string-in-file-with-diferent-row-schema/m-p/2274131#M50892</guid>
      <dc:creator>uzix</dc:creator>
      <dc:date>2018-09-10T21:27:47Z</dc:date>
    </item>
    <item>
      <title>Re: replace a value in string in file with diferent row schema</title>
      <link>https://community.qlik.com/t5/Talend-Studio/replace-a-value-in-string-in-file-with-diferent-row-schema/m-p/2274132#M50893</link>
      <description>Basically all records will have the same schema.
&lt;BR /&gt;A second step using tFileInputFullRow should help to retrieve original schemas (probably with help of String.replaceAll to remove ";;" sequences).</description>
      <pubDate>Mon, 10 Sep 2018 22:54:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/replace-a-value-in-string-in-file-with-diferent-row-schema/m-p/2274132#M50893</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2018-09-10T22:54:22Z</dc:date>
    </item>
    <item>
      <title>Re: replace a value in string in file with diferent row schema</title>
      <link>https://community.qlik.com/t5/Talend-Studio/replace-a-value-in-string-in-file-with-diferent-row-schema/m-p/2274133#M50894</link>
      <description>you can use tMap. 
&lt;BR /&gt;when tmap is into your job you can select it and press F1 to reach help and sample. 
&lt;BR /&gt;It's one of the greatest Talend component. 
&lt;BR /&gt;replay if you need more help. 
&lt;BR /&gt;Regards</description>
      <pubDate>Tue, 11 Sep 2018 08:14:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/replace-a-value-in-string-in-file-with-diferent-row-schema/m-p/2274133#M50894</guid>
      <dc:creator>fdenis</dc:creator>
      <dc:date>2018-09-11T08:14:19Z</dc:date>
    </item>
    <item>
      <title>Re: replace a value in string in file with diferent row schema</title>
      <link>https://community.qlik.com/t5/Talend-Studio/replace-a-value-in-string-in-file-with-diferent-row-schema/m-p/2274134#M50895</link>
      <description>hi TRF,&lt;BR /&gt;&lt;BR /&gt;you pointed me in the right direction, i thank you.&lt;BR /&gt;i used a tmap and left join.&lt;BR /&gt;if i use tFileInputFullRow and then use replace, do you know how can i save the lines to a file without schema ? maybe to a txt and then change extension to csv ?</description>
      <pubDate>Tue, 11 Sep 2018 09:09:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/replace-a-value-in-string-in-file-with-diferent-row-schema/m-p/2274134#M50895</guid>
      <dc:creator>uzix</dc:creator>
      <dc:date>2018-09-11T09:09:25Z</dc:date>
    </item>
    <item>
      <title>Re: replace a value in string in file with diferent row schema</title>
      <link>https://community.qlik.com/t5/Talend-Studio/replace-a-value-in-string-in-file-with-diferent-row-schema/m-p/2274135#M50896</link>
      <description>there is multiple solutions 
&lt;BR /&gt;but you can directly save as csv. 
&lt;BR /&gt; 
&lt;BR /&gt;you can define your csv with more columns who are filled or not you just have to manually manage separators 
&lt;BR /&gt;you also can define the last field as String (containing all columns in csv format). 
&lt;BR /&gt; 
&lt;BR /&gt;</description>
      <pubDate>Tue, 11 Sep 2018 09:19:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/replace-a-value-in-string-in-file-with-diferent-row-schema/m-p/2274135#M50896</guid>
      <dc:creator>fdenis</dc:creator>
      <dc:date>2018-09-11T09:19:16Z</dc:date>
    </item>
    <item>
      <title>Re: replace a value in string in file with diferent row schema</title>
      <link>https://community.qlik.com/t5/Talend-Studio/replace-a-value-in-string-in-file-with-diferent-row-schema/m-p/2274136#M50897</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LNJ9AAO"&gt;@uzix&lt;/A&gt;, you may&amp;nbsp;use a tFileOutputDelimited with a single column schema as soon as you set the Field Separator to a special character which never appears into your file.&lt;/P&gt; 
&lt;P&gt;Here is how it should look like:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LzPi.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/157592i01E3077D71F56EE7/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LzPi.png" alt="0683p000009LzPi.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;And the result file is like this:&lt;/P&gt; 
&lt;PRE&gt;00;column1;column2;column3;
11;column1;column2;
22;column1;column2;column3;column4;
33;column1;column2;column3;column4;column5;&lt;/PRE&gt; 
&lt;P&gt;You have a varying number of fields for each record.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Sep 2018 09:37:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/replace-a-value-in-string-in-file-with-diferent-row-schema/m-p/2274136#M50897</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2018-09-11T09:37:39Z</dc:date>
    </item>
    <item>
      <title>Re: replace a value in string in file with diferent row schema</title>
      <link>https://community.qlik.com/t5/Talend-Studio/replace-a-value-in-string-in-file-with-diferent-row-schema/m-p/2274137#M50898</link>
      <description>&lt;P&gt;thank you TRF and fdenis,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you both provided me with solutions to my issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Sep 2018 09:45:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/replace-a-value-in-string-in-file-with-diferent-row-schema/m-p/2274137#M50898</guid>
      <dc:creator>uzix</dc:creator>
      <dc:date>2018-09-11T09:45:54Z</dc:date>
    </item>
  </channel>
</rss>

