<?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: TRUNCATE TABLE ONLY IF NECESSARY in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/TRUNCATE-TABLE-ONLY-IF-NECESSARY/m-p/2288495#M61978</link>
    <description>The easiest way is include a row counter in each flow and put a tOracleRow between tMap and tOracleOutput.  Make the statement something like: &amp;lt;row&amp;gt;.&amp;lt;column&amp;gt; == 1 ? "TRUNCATE TABLE &amp;lt;table&amp;gt;" : "SELECT Null"</description>
    <pubDate>Wed, 19 Jun 2013 06:53:10 GMT</pubDate>
    <dc:creator>alevy</dc:creator>
    <dc:date>2013-06-19T06:53:10Z</dc:date>
    <item>
      <title>TRUNCATE TABLE ONLY IF NECESSARY</title>
      <link>https://community.qlik.com/t5/Talend-Studio/TRUNCATE-TABLE-ONLY-IF-NECESSARY/m-p/2288493#M61976</link>
      <description>Hi, 
&lt;BR /&gt;i want read table and create different flow data filtering by a column. 
&lt;BR /&gt;For each flow i want truncate the target table of the flow only if the flow contain data. 
&lt;BR /&gt;It's possible to do? 
&lt;BR /&gt;See picture 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MEfx.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/136129i8040FC09D2D2198A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MEfx.png" alt="0683p000009MEfx.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Tue, 18 Jun 2013 16:02:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/TRUNCATE-TABLE-ONLY-IF-NECESSARY/m-p/2288493#M61976</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-06-18T16:02:39Z</dc:date>
    </item>
    <item>
      <title>Re: TRUNCATE TABLE ONLY IF NECESSARY</title>
      <link>https://community.qlik.com/t5/Talend-Studio/TRUNCATE-TABLE-ONLY-IF-NECESSARY/m-p/2288494#M61977</link>
      <description>It is possible, but not in the way describe. You have to check before if your query would return datasets (replace the result columns with a count(*)) and depending on the result you have to truncate the tables in separate tOracleRow components.&lt;BR /&gt;Probably you already though this, sorry there is no easy way to solve this.</description>
      <pubDate>Tue, 18 Jun 2013 21:03:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/TRUNCATE-TABLE-ONLY-IF-NECESSARY/m-p/2288494#M61977</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-06-18T21:03:12Z</dc:date>
    </item>
    <item>
      <title>Re: TRUNCATE TABLE ONLY IF NECESSARY</title>
      <link>https://community.qlik.com/t5/Talend-Studio/TRUNCATE-TABLE-ONLY-IF-NECESSARY/m-p/2288495#M61978</link>
      <description>The easiest way is include a row counter in each flow and put a tOracleRow between tMap and tOracleOutput.  Make the statement something like: &amp;lt;row&amp;gt;.&amp;lt;column&amp;gt; == 1 ? "TRUNCATE TABLE &amp;lt;table&amp;gt;" : "SELECT Null"</description>
      <pubDate>Wed, 19 Jun 2013 06:53:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/TRUNCATE-TABLE-ONLY-IF-NECESSARY/m-p/2288495#M61978</guid>
      <dc:creator>alevy</dc:creator>
      <dc:date>2013-06-19T06:53:10Z</dc:date>
    </item>
    <item>
      <title>Re: TRUNCATE TABLE ONLY IF NECESSARY</title>
      <link>https://community.qlik.com/t5/Talend-Studio/TRUNCATE-TABLE-ONLY-IF-NECESSARY/m-p/2288496#M61979</link>
      <description>Hi,&lt;BR /&gt;how can I insert a row counter? I must use taggregaterow or something else? And  after this:&lt;BR /&gt;&amp;lt;row&amp;gt;.&amp;lt;column&amp;gt; == 1 ? "TRUNCATE TABLE &amp;lt;table&amp;gt;" : "SELECT Null" --&amp;gt; I must truncate and insert if condition is true.&lt;BR /&gt;Whit your statement I can truncate but how can I insert?&lt;BR /&gt;Thanks in advance,&lt;BR /&gt;Gino.</description>
      <pubDate>Wed, 19 Jun 2013 10:49:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/TRUNCATE-TABLE-ONLY-IF-NECESSARY/m-p/2288496#M61979</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-06-19T10:49:21Z</dc:date>
    </item>
    <item>
      <title>Re: TRUNCATE TABLE ONLY IF NECESSARY</title>
      <link>https://community.qlik.com/t5/Talend-Studio/TRUNCATE-TABLE-ONLY-IF-NECESSARY/m-p/2288497#M61980</link>
      <description>Use e.g. Numeric.sequence("out1",1,1) in tMap to create a row counter.  Make sure the sequence has a different name for each flow to a different table.&lt;BR /&gt;tOracleRow just does the truncation for the first row that passes through.  tOracleOutput still does the insert.</description>
      <pubDate>Wed, 19 Jun 2013 13:11:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/TRUNCATE-TABLE-ONLY-IF-NECESSARY/m-p/2288497#M61980</guid>
      <dc:creator>alevy</dc:creator>
      <dc:date>2013-06-19T13:11:50Z</dc:date>
    </item>
  </channel>
</rss>

