<?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: Generate files with same milisecond in file name    [ currentTimeMillis(); ] in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Generate-files-with-same-milisecond-in-file-name/m-p/2298869#M71276</link>
    <description>Try something like this:&lt;BR /&gt;TalendDate.getDate("CCYYMMDDhhmmssSSS")&lt;BR /&gt;or play with the format</description>
    <pubDate>Fri, 02 Mar 2018 14:13:14 GMT</pubDate>
    <dc:creator>TRF</dc:creator>
    <dc:date>2018-03-02T14:13:14Z</dc:date>
    <item>
      <title>Generate files with same milisecond in file name    [ currentTimeMillis(); ]</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Generate-files-with-same-milisecond-in-file-name/m-p/2298865#M71272</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I have generated 3 csv files and the issue is that these files should have the same timestamp (currentTimeMillis) attached to them.&lt;/P&gt; 
&lt;P&gt;I have build 3 job for each of these files.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Example of file name should be :&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Customers_EN_&lt;EM&gt;&lt;STRONG&gt;1512484811837&lt;/STRONG&gt;&lt;/EM&gt;.csv&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Adresses_EN_&lt;/SPAN&gt;&lt;SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;1512484811837&lt;/EM&gt;&lt;/STRONG&gt;.csv&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Dependants_EN_&lt;STRONG&gt;&lt;EM&gt;1512484811837&lt;/EM&gt;&lt;/STRONG&gt;.csv&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Is there a way to save the timestamp and use them when defining the filename?&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Also what is the syntax to get to timestamp millisecond?&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Thank you for your help.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;asadasing&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 08:37:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Generate-files-with-same-milisecond-in-file-name/m-p/2298865#M71272</guid>
      <dc:creator>RA6</dc:creator>
      <dc:date>2024-11-16T08:37:02Z</dc:date>
    </item>
    <item>
      <title>Re: Generate files with same milisecond in file name    [ currentTimeMillis(); ]</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Generate-files-with-same-milisecond-in-file-name/m-p/2298866#M71273</link>
      <description>Use a tSetGlobalVar component when the job starts to get the value then reuse the variable where you want.</description>
      <pubDate>Fri, 02 Mar 2018 13:47:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Generate-files-with-same-milisecond-in-file-name/m-p/2298866#M71273</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2018-03-02T13:47:46Z</dc:date>
    </item>
    <item>
      <title>Re: Generate files with same milisecond in file name    [ currentTimeMillis(); ]</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Generate-files-with-same-milisecond-in-file-name/m-p/2298867#M71274</link>
      <description>&lt;P&gt;At the beginning of your job place a tJava component. In that component, put the following code.....&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;String timeInMillis = routines.TalendDate.getCurrentDate().getTime()+"";
globalMap.put("timeInMillis", timeInMillis);&lt;/PRE&gt; 
&lt;P&gt;Then, when you want to name your files, use the following code....&lt;/P&gt; 
&lt;PRE&gt;"Filename_"+((String)globalMap.get("timeInMillis"))+".txt"&lt;/PRE&gt; 
&lt;P&gt;Obviously change the hardcoded parts to match your requirement.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;EDIT: Just noticed this is essentially what&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LKj7AAG"&gt;@TRF&lt;/A&gt;&amp;nbsp;said. We seem to keep replying at the same time. Sorry, didn't see you had commented.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Mar 2018 13:50:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Generate-files-with-same-milisecond-in-file-name/m-p/2298867#M71274</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-02T13:50:26Z</dc:date>
    </item>
    <item>
      <title>Re: Generate files with same milisecond in file name    [ currentTimeMillis(); ]</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Generate-files-with-same-milisecond-in-file-name/m-p/2298868#M71275</link>
      <description>&lt;P&gt;Thank you for the quick reply.&lt;/P&gt; 
&lt;P&gt;Can you provide me the syntax for milisecond to insert inthe value field?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 489px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lshs.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/147556iF8792B0AB74EB491/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lshs.png" alt="0683p000009Lshs.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Regards,&lt;/P&gt; 
&lt;P&gt;asadasing&lt;/P&gt;</description>
      <pubDate>Fri, 02 Mar 2018 13:55:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Generate-files-with-same-milisecond-in-file-name/m-p/2298868#M71275</guid>
      <dc:creator>RA6</dc:creator>
      <dc:date>2018-03-02T13:55:07Z</dc:date>
    </item>
    <item>
      <title>Re: Generate files with same milisecond in file name    [ currentTimeMillis(); ]</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Generate-files-with-same-milisecond-in-file-name/m-p/2298869#M71276</link>
      <description>Try something like this:&lt;BR /&gt;TalendDate.getDate("CCYYMMDDhhmmssSSS")&lt;BR /&gt;or play with the format</description>
      <pubDate>Fri, 02 Mar 2018 14:13:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Generate-files-with-same-milisecond-in-file-name/m-p/2298869#M71276</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2018-03-02T14:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: Generate files with same milisecond in file name    [ currentTimeMillis(); ]</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Generate-files-with-same-milisecond-in-file-name/m-p/2298870#M71277</link>
      <description>&lt;P&gt;There is a subtle difference between what I showed and what&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LKj7AAG"&gt;@TRF&lt;/A&gt;&amp;nbsp;is suggesting. The code I gave will return milliseconds after 1 Jan 1970, 00:00:00. The code&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LKj7AAG"&gt;@TRF&lt;/A&gt;&amp;nbsp;has given will return a number representing years, months, days, hours, minutes, seconds, and milliseconds. Both are equally unique, but not the same.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Mar 2018 14:36:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Generate-files-with-same-milisecond-in-file-name/m-p/2298870#M71277</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-02T14:36:28Z</dc:date>
    </item>
  </channel>
</rss>

