<?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: newbie question on writing to a sql db in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/newbie-question-on-writing-to-a-sql-db/m-p/2260251#M41439</link>
    <description>&lt;P&gt;there are many ways to achieve&amp;nbsp;the same goals:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;who and how generate these logs?&lt;/LI&gt;&lt;LI&gt;is it possible truncate logs after reading?&lt;/LI&gt;&lt;LI&gt;you could use insert ignore if output database support it&lt;/LI&gt;&lt;LI&gt;you could add database trigger to ignore duplicates if a database does&amp;nbsp; not support insert ignore, or use tSQLRow to do the same (INSERT xxx WHERE NOT EXISTS ...)&lt;/LI&gt;&lt;LI&gt;you could&amp;nbsp;read data from db and reject duplicates in tMap if data not too big&lt;/LI&gt;&lt;/OL&gt;</description>
    <pubDate>Wed, 13 Feb 2019 01:33:12 GMT</pubDate>
    <dc:creator>vapukov</dc:creator>
    <dc:date>2019-02-13T01:33:12Z</dc:date>
    <item>
      <title>newbie question on writing to a sql db</title>
      <link>https://community.qlik.com/t5/Talend-Studio/newbie-question-on-writing-to-a-sql-db/m-p/2260248#M41436</link>
      <description>&lt;P&gt;How do I make sure that I do not duplicate data being copied from a flat file to a sql table&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am reading a txt file going thru logrow and then writing to a sql table. The process works but every time I run it the same data gets inserted into my sql table&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know when writing to a txt file you have the option of append or rewrite .. is there such an option for writing to sql&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Feb 2019 21:47:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/newbie-question-on-writing-to-a-sql-db/m-p/2260248#M41436</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-12T21:47:18Z</dc:date>
    </item>
    <item>
      <title>Re: newbie question on writing to a sql db</title>
      <link>https://community.qlik.com/t5/Talend-Studio/newbie-question-on-writing-to-a-sql-db/m-p/2260249#M41437</link>
      <description>&lt;P&gt;Hi Tom&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;with files the same - if you will append same information, it will be duplicated and in files as well&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;but you could save in database row number - add column and populate it by talend&amp;nbsp;sequence&lt;/P&gt; 
&lt;P&gt;on next time - you will need request max row from table and start read the file from NNN+1 (header section of tFileInputDelimited)&lt;/P&gt; 
&lt;P&gt;you could also add more logic:&lt;/P&gt; 
&lt;UL&gt; 
 &lt;LI&gt;count number of rows in file&lt;/LI&gt; 
 &lt;LI&gt;read from NNN+1 if NNN bigger than number of rows&lt;/LI&gt; 
 &lt;LI&gt;read from begin if number of rows less than NNN - it will help in case if file was truncated, but also will require reset max NNN in database&lt;/LI&gt; 
 &lt;LI&gt;&amp;nbsp;&lt;/LI&gt; 
&lt;/UL&gt;</description>
      <pubDate>Wed, 13 Feb 2019 00:32:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/newbie-question-on-writing-to-a-sql-db/m-p/2260249#M41437</guid>
      <dc:creator>vapukov</dc:creator>
      <dc:date>2019-02-13T00:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: newbie question on writing to a sql db</title>
      <link>https://community.qlik.com/t5/Talend-Studio/newbie-question-on-writing-to-a-sql-db/m-p/2260250#M41438</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/005390000067LRbAAM" target="_self"&gt;&lt;/A&gt;&lt;/P&gt; 
&lt;P&gt;Thank you for the quick response .. I understand the thought that the data could be duplicated if the input file was used multiple times. Which is what I see when I run the job more then once. Is there a way to parse the data itself either via Talend or SQL to stop duplicate rows from being added. I am trying to learn and become more proficient so any support is very welcome&lt;/P&gt; 
&lt;P&gt;Tom&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Feb 2019 00:52:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/newbie-question-on-writing-to-a-sql-db/m-p/2260250#M41438</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-13T00:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: newbie question on writing to a sql db</title>
      <link>https://community.qlik.com/t5/Talend-Studio/newbie-question-on-writing-to-a-sql-db/m-p/2260251#M41439</link>
      <description>&lt;P&gt;there are many ways to achieve&amp;nbsp;the same goals:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;who and how generate these logs?&lt;/LI&gt;&lt;LI&gt;is it possible truncate logs after reading?&lt;/LI&gt;&lt;LI&gt;you could use insert ignore if output database support it&lt;/LI&gt;&lt;LI&gt;you could add database trigger to ignore duplicates if a database does&amp;nbsp; not support insert ignore, or use tSQLRow to do the same (INSERT xxx WHERE NOT EXISTS ...)&lt;/LI&gt;&lt;LI&gt;you could&amp;nbsp;read data from db and reject duplicates in tMap if data not too big&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Wed, 13 Feb 2019 01:33:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/newbie-question-on-writing-to-a-sql-db/m-p/2260251#M41439</guid>
      <dc:creator>vapukov</dc:creator>
      <dc:date>2019-02-13T01:33:12Z</dc:date>
    </item>
    <item>
      <title>Re: newbie question on writing to a sql db</title>
      <link>https://community.qlik.com/t5/Talend-Studio/newbie-question-on-writing-to-a-sql-db/m-p/2260252#M41440</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/005390000067LRbAAM" target="_self"&gt;&lt;/A&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class=""&gt;This is not a production environment of any sort just me trying to learn how to write to a sql db. One idea that came to me was the use of Line id and adding logic to verify the new data line id versus the largest one in the db itself. What I am finding in developing in Talend is looking at all the ways that the data needs to be handled prior to ingestion &lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class=""&gt;Tom&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Feb 2019 01:41:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/newbie-question-on-writing-to-a-sql-db/m-p/2260252#M41440</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-13T01:41:12Z</dc:date>
    </item>
  </channel>
</rss>

