<?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>article Moving QVD Files Between Spaces in Qlik Cloud Using a Script in Member Articles</title>
    <link>https://community.qlik.com/t5/Member-Articles/Moving-QVD-Files-Between-Spaces-in-Qlik-Cloud-Using-a-Script/ta-p/2493709</link>
    <description>&lt;DIV class="flex-shrink-0 flex flex-col relative items-end"&gt;
&lt;DIV&gt;
&lt;DIV class="pt-0"&gt;
&lt;DIV class="gizmo-bot-avatar flex h-8 w-8 items-center justify-center overflow-hidden rounded-full"&gt;
&lt;DIV class="relative p-1 rounded-sm flex items-center justify-center bg-token-main-surface-primary text-token-text-primary h-8 w-8"&gt;&lt;STRONG style="color: inherit; font-family: inherit; font-size: 24px;"&gt;&lt;BR /&gt;Moving QVD Files Between Spaces in Qlik Cloud Using a Script&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="group/conversation-turn relative flex w-full min-w-0 flex-col agent-turn"&gt;
&lt;DIV class="flex-col gap-1 md:gap-3"&gt;
&lt;DIV class="flex max-w-full flex-col flex-grow"&gt;
&lt;DIV class="min-h-8 text-message flex w-full flex-col items-end gap-2 whitespace-normal break-words [.text-message+&amp;amp;]:mt-5" dir="auto" data-message-author-role="assistant" data-message-id="ecf23919-edb6-4e37-a417-c789aefa7957" data-message-model-slug="gpt-4o-mini"&gt;
&lt;DIV class="flex w-full flex-col gap-1 empty:hidden first:pt-[3px]"&gt;
&lt;DIV class="markdown prose w-full break-words dark:prose-invert light"&gt;
&lt;P&gt;In Qlik Cloud, moving QVD files between different spaces is not a straightforward operation through the interface. However, with a simple loading script, you can automate the process and easily transfer multiple QVD files from one space to another.&lt;/P&gt;
&lt;P&gt;This method involves the creation of a Qlik script that loads QVD files from one location (space) and stores them into a different space. Below is a step-by-step guide to implementing this technique.&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Step 1 : Set up your Environment&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;P&gt;Before running the script, ensure that you have the necessary permissions and that both source and destination spaces are properly configured in Qlik Cloud.&lt;/P&gt;
&lt;P&gt;The script works by renaming the location of QVD files, loading them from the source space, and storing them in the target space.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;H3&gt;&lt;STRONG&gt;Moving QVD Files Between Spaces in Qlik Cloud Using a Script&lt;/STRONG&gt;&lt;/H3&gt;
&lt;P&gt;In Qlik Cloud, moving QVD files between different spaces is not a straightforward operation through the interface. However, with a simple loading script, you can automate the process and easily transfer multiple QVD files from one space to another.&lt;/P&gt;
&lt;P&gt;This method involves the creation of a Qlik script that loads QVD files from one location (space) and stores them into a different space. Below is a step-by-step guide to implementing this technique.&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Step 2 : Script explanation&lt;BR /&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;P&gt;&lt;STRONG&gt;1 : Define your files&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;We start by naming the QVD files that need to be moved. These names should correspond to the files stored in the source space.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;SET FileList= ‘File1,File2,File3’&lt;/LI-CODE&gt;
&lt;P&gt;This line initializes a variable FileList&amp;nbsp;containing the names of the QVD files. You can list as many files as you want, separated by commas.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;2 : Loop over the file list&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;The script uses a FOR loop to iterate over each table listed in the FileList. It splits the list using commas and processes each file one by one.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;FOR i = 1 TO SubStringCount('$(FileList)', ',' ) + 1
LET var = SubField('$(FileList)', ',', $(i));&lt;/LI-CODE&gt;
&lt;DIV class="contain-inline-size rounded-md border-[0.5px] border-token-border-medium relative bg-token-sidebar-surface-primary dark:bg-gray-950"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;This segment identifies each table in the list and assigns it to the variable var.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;3 : Loop over the file list&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;For each table, the script defines the path of the QVD file in both the source and target spaces.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;LET oldQVD = 'lib://OLDSPACE:DataFiles/$(var).qvd';
LET newQVD  = 'lib://NEWSPACE:DataFiles/$(var).qvd';
&lt;/LI-CODE&gt;
&lt;DIV class="contain-inline-size rounded-md border-[0.5px] border-token-border-medium relative bg-token-sidebar-surface-primary dark:bg-gray-950"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;Here, oldQVD is the path to the source QVD file, and newQVD is the new path in the target space. Make sure to adjust these paths to match your Qlik Cloud environment.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;4 : Load and Store the Data&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;The script loads the data from the source space and stores it in the destination space.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;TRACE ‘Moving of the file from $(oldQVD) to $(newQVD)';
[$(var)]:
LOAD * FROM [$(oldQVD)] (qvd);
STORE [$(var)] INTO [$(newQVD)](qvd);
DROP TABLE [$(var)];

NEXT
EXIT SCRIPT;&lt;/LI-CODE&gt;
&lt;DIV class="contain-inline-size rounded-md border-[0.5px] border-token-border-medium relative bg-token-sidebar-surface-primary dark:bg-gray-950"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;The TRACE&amp;nbsp;command outputs information for monitoring the process.&lt;BR /&gt;The LOAD statement loads the QVD file from the source location.&lt;BR /&gt;The STORE command saves the data into the new QVD file in the target space.&lt;BR /&gt;The DROP TABLE command removes the table from memory after storing it.&lt;BR /&gt;Finally, the NEXT command&amp;nbsp; is used to move to the next iteration in the FOR loop.&lt;/P&gt;
&lt;P&gt;After processing all the QVD files, the script exits.&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Step 3 : Execute the script&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;P&gt;Once you've adjusted the paths and files names, simply run the script in the Qlik Cloud environment. This will move the specified QVD files from the source space to the target space, one by one.&lt;/P&gt;
&lt;DIV class="flex-shrink-0 flex flex-col relative items-end"&gt;
&lt;DIV&gt;
&lt;DIV class="pt-0"&gt;
&lt;DIV class="gizmo-bot-avatar flex h-8 w-8 items-center justify-center overflow-hidden rounded-full"&gt;
&lt;DIV class="relative p-1 rounded-sm flex items-center justify-center bg-token-main-surface-primary text-token-text-primary h-8 w-8"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="group/conversation-turn relative flex w-full min-w-0 flex-col agent-turn"&gt;
&lt;DIV class="flex-col gap-1 md:gap-3"&gt;
&lt;DIV class="flex max-w-full flex-col flex-grow"&gt;
&lt;DIV class="min-h-8 text-message flex w-full flex-col items-end gap-2 whitespace-normal break-words [.text-message+&amp;amp;]:mt-5" dir="auto" data-message-author-role="assistant" data-message-id="c852a86a-87d6-456a-a3fb-ed5f50945004" data-message-model-slug="gpt-4o-mini"&gt;
&lt;DIV class="flex w-full flex-col gap-1 empty:hidden first:pt-[3px]"&gt;
&lt;DIV class="markdown prose w-full break-words dark:prose-invert light"&gt;
&lt;P&gt;Here’s the complete script you can use directly without having to copy-paste each section:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;SET FileList= ‘File1,File2,File3’

FOR i = 1 TO SubStringCount('$(FileList)', ',' ) + 1
LET var = SubField('$(FileList)', ',', $(i));

LET oldQVD = 'lib://OLDSPACE:DataFiles/$(var).qvd';
LET newQVD  = 'lib://NEWSPACE:DataFiles/$(var).qvd';

TRACE ‘Moving of the file from $(oldQVD) to $(newQVD)';
[$(var)]:
LOAD * FROM [$(oldQVD)] (qvd);
STORE [$(var)] INTO [$(newQVD)](qvd);
DROP TABLE [$(var)];

NEXT
EXIT SCRIPT;&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&lt;BR /&gt;Thank you for the reading.&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Environment&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;UL&gt;
&lt;LI&gt;Qlik Cloud on the 20th november 2024&lt;/LI&gt;
&lt;/UL&gt;</description>
    <pubDate>Wed, 20 Nov 2024 16:20:26 GMT</pubDate>
    <dc:creator>theoat</dc:creator>
    <dc:date>2024-11-20T16:20:26Z</dc:date>
    <item>
      <title>Moving QVD Files Between Spaces in Qlik Cloud Using a Script</title>
      <link>https://community.qlik.com/t5/Member-Articles/Moving-QVD-Files-Between-Spaces-in-Qlik-Cloud-Using-a-Script/ta-p/2493709</link>
      <description>&lt;P&gt;Struggling to manage your QVD files across multiple spaces in Qlik Cloud? We’ve got a quick and efficient solution for you! With a simple loading script, you can automate the process of moving QVD files from one space to another — no manual export/import needed!&lt;/P&gt;
&lt;P&gt;In just a few lines of code, you’ll be able to:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;Easily transfer QVD files&lt;/STRONG&gt; between spaces in Qlik Cloud&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Automate the process&lt;/STRONG&gt; for multiple files at once&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Save time&lt;/STRONG&gt; and streamline your workflow&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Check out the full script and learn how to move your data quickly and effortlessly! &lt;span class="lia-unicode-emoji" title=":rocket:"&gt;🚀&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2024 16:20:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Member-Articles/Moving-QVD-Files-Between-Spaces-in-Qlik-Cloud-Using-a-Script/ta-p/2493709</guid>
      <dc:creator>theoat</dc:creator>
      <dc:date>2024-11-20T16:20:26Z</dc:date>
    </item>
  </channel>
</rss>

