<?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: Dynamically load qvd's from from folder in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Dynamically-load-qvd-s-from-from-folder/m-p/1831075#M68512</link>
    <description>&lt;P&gt;OK, this then:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;SET vDays = 7;

SET YourQVDFolderPath = 'lib://DATA';

temp_filelist:
LOAD
FILENAME() AS filename
FROM [$(YourQVDFolderPath)/*.QVD] (QVD);

temp_filelist2:
LOAD *,
NUM(DATE#(RIGHT(SUBFIELD(filename,'.',1),8),'YYYYMMDD')) as date
RESIDENT temp_filelist;

DROP TABLE temp_filelist;

temp_filelist3:
LOAD *,
ROWNO() AS id
RESIDENT temp_filelist2
ORDER BY date desc;

DROP TABLE temp_filelist2;

INNER JOIN (temp_filelist3)
LOAD
ROWNO() AS id
AUTOGENERATE $(vDays);

data:
LOAD 0 AS temp_field AUTOGENERATE 0;

FOR EACH vQVDFile IN FIELDVALUELIST('filename')

CONCATENATE (data)
LOAD * FROM [$(YourQVDFolderPath)/$(vQVDFile)] (QVD);

NEXT vQVDFile;

DROP FIELD temp_field;
DROP TABLE temp_filelist3;&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 25 Aug 2021 10:43:06 GMT</pubDate>
    <dc:creator>RsQK</dc:creator>
    <dc:date>2021-08-25T10:43:06Z</dc:date>
    <item>
      <title>Dynamically load qvd's from from folder</title>
      <link>https://community.qlik.com/t5/App-Development/Dynamically-load-qvd-s-from-from-folder/m-p/1831039#M68508</link>
      <description>&lt;P&gt;Hello I have a folder&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That contain&lt;/P&gt;&lt;P&gt;A_20210825&lt;/P&gt;&lt;P&gt;A_20210824&lt;/P&gt;&lt;P&gt;A_20210823&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Like everyday I need to pick only last 2 days qvd's&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2021 16:25:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Dynamically-load-qvd-s-from-from-folder/m-p/1831039#M68508</guid>
      <dc:creator>Surya</dc:creator>
      <dc:date>2021-11-30T16:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically load qvd's from from folder</title>
      <link>https://community.qlik.com/t5/App-Development/Dynamically-load-qvd-s-from-from-folder/m-p/1831062#M68509</link>
      <description>&lt;P&gt;Hey, this would work, if you definitely have those qvd's there:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;data:
LOAD 0 AS temp_field AUTOGENERATE 0;

LET vToday = DATE(TODAY(),'YYYYMMDD');
LET vYesterday = DATE(TODAY()-1,'YYYYMMDD');

CONCATENATE (data)
LOAD * FROM [$(YourQVDFolderPath)/A_$(vToday).qvd] (QVD);

CONCATENATE (data)
LOAD * FROM [$(YourQVDFolderPath)/A_$(vYesterday).qvd] (QVD);

DROP FIELD temp_field;&lt;/LI-CODE&gt;&lt;P&gt;If theres no QVD for today, should you load max date qvd and previous one from that?&lt;/P&gt;</description>
      <pubDate>Wed, 25 Aug 2021 10:11:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Dynamically-load-qvd-s-from-from-folder/m-p/1831062#M68509</guid>
      <dc:creator>RsQK</dc:creator>
      <dc:date>2021-08-25T10:11:29Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically load qvd's from from folder</title>
      <link>https://community.qlik.com/t5/App-Development/Dynamically-load-qvd-s-from-from-folder/m-p/1831065#M68510</link>
      <description>&lt;P&gt;sorry.. Actually we require last 7 days files and dates also different means may be earlier dates.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Aug 2021 10:19:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Dynamically-load-qvd-s-from-from-folder/m-p/1831065#M68510</guid>
      <dc:creator>Surya</dc:creator>
      <dc:date>2021-08-25T10:19:14Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically load qvd's from from folder</title>
      <link>https://community.qlik.com/t5/App-Development/Dynamically-load-qvd-s-from-from-folder/m-p/1831075#M68512</link>
      <description>&lt;P&gt;OK, this then:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;SET vDays = 7;

SET YourQVDFolderPath = 'lib://DATA';

temp_filelist:
LOAD
FILENAME() AS filename
FROM [$(YourQVDFolderPath)/*.QVD] (QVD);

temp_filelist2:
LOAD *,
NUM(DATE#(RIGHT(SUBFIELD(filename,'.',1),8),'YYYYMMDD')) as date
RESIDENT temp_filelist;

DROP TABLE temp_filelist;

temp_filelist3:
LOAD *,
ROWNO() AS id
RESIDENT temp_filelist2
ORDER BY date desc;

DROP TABLE temp_filelist2;

INNER JOIN (temp_filelist3)
LOAD
ROWNO() AS id
AUTOGENERATE $(vDays);

data:
LOAD 0 AS temp_field AUTOGENERATE 0;

FOR EACH vQVDFile IN FIELDVALUELIST('filename')

CONCATENATE (data)
LOAD * FROM [$(YourQVDFolderPath)/$(vQVDFile)] (QVD);

NEXT vQVDFile;

DROP FIELD temp_field;
DROP TABLE temp_filelist3;&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 25 Aug 2021 10:43:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Dynamically-load-qvd-s-from-from-folder/m-p/1831075#M68512</guid>
      <dc:creator>RsQK</dc:creator>
      <dc:date>2021-08-25T10:43:06Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically load qvd's from from folder</title>
      <link>https://community.qlik.com/t5/App-Development/Dynamically-load-qvd-s-from-from-folder/m-p/1831080#M68515</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/103456"&gt;@RsQK&lt;/a&gt;&amp;nbsp; Thank you .&lt;/P&gt;&lt;P&gt;Its working&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SET vDays = 7;&lt;/P&gt;&lt;P&gt;SET Path = 'lib://JP_CDH_Dealer_GPM_D/50_Data/Test/';&lt;/P&gt;&lt;P&gt;temp_filelist:&lt;BR /&gt;LOAD&lt;BR /&gt;FILENAME() AS filename&lt;BR /&gt;FROM [lib://JP_CDH_Dealer_GPM_D/50_Data/Test/txn_data_*.xlsx](ooxml, embedded labels, table is Tabelle1);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;temp_filelist2:&lt;BR /&gt;LOAD *,&lt;BR /&gt;NUM(DATE#(RIGHT(SUBFIELD(filename,'.',1),8),'YYYYMMDD')) as date&lt;BR /&gt;RESIDENT temp_filelist;&lt;/P&gt;&lt;P&gt;DROP TABLE temp_filelist;&lt;/P&gt;&lt;P&gt;temp_filelist3:&lt;BR /&gt;LOAD *,&lt;BR /&gt;AUTONUMBER(date) AS id&lt;BR /&gt;RESIDENT temp_filelist2&lt;BR /&gt;ORDER BY date DESC;&lt;/P&gt;&lt;P&gt;DROP TABLE temp_filelist2;&lt;/P&gt;&lt;P&gt;INNER JOIN (temp_filelist3)&lt;/P&gt;&lt;P&gt;LOAD&lt;BR /&gt;ROWNO() AS id&lt;BR /&gt;AUTOGENERATE $(vDays);&lt;/P&gt;&lt;P&gt;data:&lt;BR /&gt;LOAD 0 AS temp_field AUTOGENERATE 0;&lt;/P&gt;&lt;P&gt;FOR EACH vFile IN FIELDVALUELIST('filename')&lt;/P&gt;&lt;P&gt;CONCATENATE (data)&lt;BR /&gt;LOAD * FROM [$(Path)/$(vFile)](ooxml, embedded labels, table is Tabelle1);&lt;/P&gt;&lt;P&gt;NEXT vFile;&lt;/P&gt;&lt;P&gt;DROP FIELD temp_field;&lt;BR /&gt;DROP TABLE temp_filelist3;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Aug 2021 11:32:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Dynamically-load-qvd-s-from-from-folder/m-p/1831080#M68515</guid>
      <dc:creator>Surya</dc:creator>
      <dc:date>2021-08-25T11:32:46Z</dc:date>
    </item>
  </channel>
</rss>

