<?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 Load multiple files into one qvd in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Load-multiple-files-into-one-qvd/m-p/1781731#M13816</link>
    <description>&lt;P&gt;So I have this script that joins a lot of .qvd files I have in my Drive. But every week I upload new qvd files there, so every time I run this script it has too look for a bunch of files and it takes longer and longer to load it.&lt;BR /&gt;&lt;BR /&gt;What I want to do have a single file that contains the data from all of them, so that I can delete the older ones and keep adding data from new files to this single file.&lt;BR /&gt;&lt;BR /&gt;Is it possible? This is my script right now&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;LIB CONNECT TO 'GoogleDrive_metadata';

LET folder_id = 'FOLDERID';


tmpFiles:
LOAD
     title
;
SELECT
     title
FROM ListFiles
WITH PROPERTIES (
query='title contains ".qvd" and trashed = false'
);

for iFile = 0 to NoOfRows('tmpFiles') -1
    let vFile = peek('title', iFile, 'tmpFiles');
    
    UnificaçãoDados:
    LOAD
         *,
         filename() as FileName
    FROM [lib://GoogleDrive/$(folder_id)/$(vFile)] (qvd);
Next

Store UnificaçãoDados into [lib://GoogleDrive/ALLDATA.qvd] (qvd);


DROP TABLE tmpFiles;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 17:30:00 GMT</pubDate>
    <dc:creator>bjagrelli</dc:creator>
    <dc:date>2024-11-16T17:30:00Z</dc:date>
    <item>
      <title>Load multiple files into one qvd</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Load-multiple-files-into-one-qvd/m-p/1781731#M13816</link>
      <description>&lt;P&gt;So I have this script that joins a lot of .qvd files I have in my Drive. But every week I upload new qvd files there, so every time I run this script it has too look for a bunch of files and it takes longer and longer to load it.&lt;BR /&gt;&lt;BR /&gt;What I want to do have a single file that contains the data from all of them, so that I can delete the older ones and keep adding data from new files to this single file.&lt;BR /&gt;&lt;BR /&gt;Is it possible? This is my script right now&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;LIB CONNECT TO 'GoogleDrive_metadata';

LET folder_id = 'FOLDERID';


tmpFiles:
LOAD
     title
;
SELECT
     title
FROM ListFiles
WITH PROPERTIES (
query='title contains ".qvd" and trashed = false'
);

for iFile = 0 to NoOfRows('tmpFiles') -1
    let vFile = peek('title', iFile, 'tmpFiles');
    
    UnificaçãoDados:
    LOAD
         *,
         filename() as FileName
    FROM [lib://GoogleDrive/$(folder_id)/$(vFile)] (qvd);
Next

Store UnificaçãoDados into [lib://GoogleDrive/ALLDATA.qvd] (qvd);


DROP TABLE tmpFiles;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 17:30:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Load-multiple-files-into-one-qvd/m-p/1781731#M13816</guid>
      <dc:creator>bjagrelli</dc:creator>
      <dc:date>2024-11-16T17:30:00Z</dc:date>
    </item>
    <item>
      <title>Re: Load multiple files into one qvd</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Load-multiple-files-into-one-qvd/m-p/1781738#M13817</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/131713"&gt;@bjagrelli&lt;/a&gt;&amp;nbsp;, please check the incremental loads technics that Qlik offers :&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/sense/February2021/Subsystems/Hub/Content/Sense_Hub/LoadData/use-QVD-files-incremental-load.htm" target="_blank"&gt;https://help.qlik.com/en-US/sense/February2021/Subsystems/Hub/Content/Sense_Hub/LoadData/use-QVD-files-incremental-load.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2021 18:00:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Load-multiple-files-into-one-qvd/m-p/1781738#M13817</guid>
      <dc:creator>QFabian</dc:creator>
      <dc:date>2021-02-10T18:00:14Z</dc:date>
    </item>
    <item>
      <title>Re: Load multiple files into one qvd</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Load-multiple-files-into-one-qvd/m-p/1791182#M14026</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Your script is probably taking a lot of time because of the For..Next loop.&lt;/P&gt;&lt;P&gt;A faster solution would be to reload with a wildcard name (...*.QVD)&amp;nbsp; only the new QVDs, with a filter on a [FileName] field.&lt;/P&gt;&lt;P&gt;Here is an example that you can adapt to your context:&lt;/P&gt;&lt;P&gt;// Load AllData.QVD&lt;BR /&gt;If isnull(QvdCreateTime('AllData.QVD')) Then&lt;BR /&gt;AllData: LOAD * INLINE [FileName2]; // First time: Creates empty AllData.QVD&lt;BR /&gt;Else&lt;BR /&gt;AllData: LOAD *, FileName as FileName2 FROM AllData.QVD (QVD);&lt;BR /&gt;End if&lt;BR /&gt;&lt;BR /&gt;// Accumulate ONLY new QVDs into NewData&lt;BR /&gt;NewData: LOAD filename() as FileName,* FROM File*.QVD (QVD)&amp;nbsp; // Add [FileName] field&lt;BR /&gt;WHERE NOT EXISTS(FileName2, filename());&lt;/P&gt;&lt;P&gt;// Add NewData into AllData&lt;BR /&gt;CONCATENATE (AllData) LOAD * RESIDENT NewData;&lt;BR /&gt;DROP TABLE NewData;&lt;BR /&gt;DROP FIELD FileName2;&lt;/P&gt;&lt;P&gt;// Save AllData.QVD&lt;BR /&gt;STORE AllData INTO AllData.QVD (QVD);&lt;/P&gt;</description>
      <pubDate>Sat, 13 Mar 2021 13:46:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Load-multiple-files-into-one-qvd/m-p/1791182#M14026</guid>
      <dc:creator>Denisg</dc:creator>
      <dc:date>2021-03-13T13:46:14Z</dc:date>
    </item>
  </channel>
</rss>

