<?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: [resolved] Copy files if exist from a database in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-Copy-files-if-exist-from-a-database/m-p/2370786#M133788</link>
    <description>after your "extract file name---&amp;gt;" you will have to loop in a folder and use tFileExist&lt;BR /&gt;To loop a folder use tFistList&lt;BR /&gt;&lt;BR /&gt;What is tMysqlOut used for</description>
    <pubDate>Thu, 23 Jul 2015 09:18:06 GMT</pubDate>
    <dc:creator>Jcs19</dc:creator>
    <dc:date>2015-07-23T09:18:06Z</dc:date>
    <item>
      <title>[resolved] Copy files if exist from a database</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Copy-files-if-exist-from-a-database/m-p/2370785#M133787</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;i have multiple files to copy if exist. I get their name in a database but i don't know how to use them in the tFileExist component&lt;BR /&gt;&lt;BR /&gt;tMysqlInput ---&amp;gt; tMap --&amp;gt; extract file name --&amp;gt; If exist, copy it&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |-----&amp;gt; tMysqlOut --&amp;gt; etc.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jul 2015 08:54:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Copy-files-if-exist-from-a-database/m-p/2370785#M133787</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-07-23T08:54:46Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Copy files if exist from a database</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Copy-files-if-exist-from-a-database/m-p/2370786#M133788</link>
      <description>after your "extract file name---&amp;gt;" you will have to loop in a folder and use tFileExist&lt;BR /&gt;To loop a folder use tFistList&lt;BR /&gt;&lt;BR /&gt;What is tMysqlOut used for</description>
      <pubDate>Thu, 23 Jul 2015 09:18:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Copy-files-if-exist-from-a-database/m-p/2370786#M133788</guid>
      <dc:creator>Jcs19</dc:creator>
      <dc:date>2015-07-23T09:18:06Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Copy files if exist from a database</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Copy-files-if-exist-from-a-database/m-p/2370787#M133789</link>
      <description>Hi Jcs19, thanks for the help.&lt;BR /&gt;&lt;BR /&gt;TMysqlOuput is used for copy one DB to another, This works great.&lt;BR /&gt;&lt;BR /&gt;Maybe my explanation of my issue is not clear.&lt;BR /&gt;I have files in a directory (source) to copy to another (target) but ONLY if this file is referenced in the source DB. &lt;BR /&gt;&lt;BR /&gt;When i try to copy file that doesn't exists in the source dir, job failed with "&lt;B&gt;File XXXX does not exist&lt;/B&gt;". &lt;BR /&gt;&lt;BR /&gt;So i tried to use tFileExist component to test the file but i don't known how to connect tMap to tFileExist.&lt;BR /&gt;&lt;BR /&gt;I tried with a &lt;B&gt;tMap --&amp;gt; tFlowToIterate ---&amp;gt; tFileExist --&amp;gt;(On Component OK) --&amp;gt; tFileCopy&lt;/B&gt;&lt;BR /&gt;&lt;BR /&gt;but don't work, it seems tFileExists always answer 'OK', event if the file is missing.</description>
      <pubDate>Thu, 23 Jul 2015 10:24:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Copy-files-if-exist-from-a-database/m-p/2370787#M133789</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-07-23T10:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Copy files if exist from a database</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Copy-files-if-exist-from-a-database/m-p/2370788#M133790</link>
      <description>&lt;BLOCKQUOTE&gt;ddelhoume wrote:&lt;BR /&gt;Hi Jcs19, thanks for the help.&lt;BR /&gt;&lt;BR /&gt;TMysqlOuput is used for copy one DB to another, This works great.&lt;BR /&gt;&lt;BR /&gt;Maybe my explanation of my issue is not clear.&lt;BR /&gt;I have files in a directory (source) to copy to another (target) but ONLY if this file is referenced in the source DB. &lt;BR /&gt;&lt;BR /&gt;When i try to copy file that doesn't exists in the source dir, job failed with "&lt;B&gt;File XXXX does not exist&lt;/B&gt;". &lt;BR /&gt;&lt;BR /&gt;So i tried to use tFileExist component to test the file but i don't known how to connect tMap to tFileExist.&lt;BR /&gt;&lt;BR /&gt;I tried with a &lt;B&gt;tMap --&amp;gt; tFlowToIterate ---&amp;gt; tFileExist --&amp;gt;(On Component OK) --&amp;gt; tFileCopy&lt;/B&gt;&lt;BR /&gt;&lt;BR /&gt;but don't work, it seems tFileExists always answer 'OK', event if the file is missing.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;Oh ok, I misunderstood&lt;BR /&gt;Can you try to replace "On component OK" by runIf ? In runIf you put ((Boolean)globalMap.get("tFileExist_1_EXISTS"))&amp;nbsp;&lt;BR /&gt;It means if tFileExist = true.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;To use if tFileExist = false you can use &amp;nbsp;!((Boolean)globalMap.get("tFileExist_1_EXISTS"))&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;tFileExist seems to always returns 'OK' because OncomponentOk checks if the component worked but not if the file exists</description>
      <pubDate>Thu, 23 Jul 2015 11:17:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Copy-files-if-exist-from-a-database/m-p/2370788#M133790</guid>
      <dc:creator>Jcs19</dc:creator>
      <dc:date>2015-07-23T11:17:52Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Copy files if exist from a database</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Copy-files-if-exist-from-a-database/m-p/2370789#M133791</link>
      <description>You did it! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;It works, thanks.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Un grand merci de Toulouse &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;</description>
      <pubDate>Thu, 23 Jul 2015 12:28:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Copy-files-if-exist-from-a-database/m-p/2370789#M133791</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-07-23T12:28:30Z</dc:date>
    </item>
  </channel>
</rss>

