Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
debabrata_sahoo
Contributor III
Contributor III

How to create multiple QVD from one table.

Hi everyone. I have some requirement, Please help me out.

From one table I need to create 12 qvds monthly basis. Then one more requirement , When I load these qvds only updated month qvds will load instead of all qvd load.

Thanks,

Deb

6 Replies
vikasmahajan

You can specify the condition where while creating QVD in QVD generator , Please post some sample to give

resolution.

regards

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
thannila
Creator
Creator

Yeah you can do that by giving the date directly.

          For example - 01-01-2018 to 31-01-2018

similarly for every month

Anonymous
Not applicable

Hi,

Perhaps on every STORE statement, you should have a unique identifier.

Something like STORE <table> into <Dir>/<table>_<date or number> . This should be incremental. I would prefer to use date so that when you write a load statement, you can use the name of the latest qvd that you want. The identifier can be stored as a variable to make things a bit easier

nasirsaikh
Creator
Creator

Hi debabrata.sahoo

Please follow the below script..

GetUniqueCode:

NoConcatenate

Load Distinct [YourCode] as Your_Code

From ABC;

Drop Table ABC;

For vRow = 1 to NoOfRows('GetUniqueCode')

   Let MyVar = Peek('Your_Code',vRow-1,'GetUniqueCode');

  

   Set TableName = '$(MyVar)';

   EXPORT_TABLE:

   Load

   Column1,

   Column2,

   Column3,

   Column4

   FROM YourPathandTableName Where YourCode = '$(TableName)';

   Store EXPORT_TABLE into YourPath\Exporting_Table_$(TableName).qvd](qvd);

   Drop Table EXPORT_TABLE;

  

   Set MyVar = Null();

   Set TableName = Null();

  

Next

Drop Table GetUniqueCode;

nasirsaikh
Creator
Creator

Please follow the below script..

GetUniqueCode:

NoConcatenate

Load Distinct [YourCode] as Your_Code

From ABC;

Drop Table ABC;

For vRow = 1 to NoOfRows('GetUniqueCode')

   Let MyVar = Peek('Your_Code',vRow-1,'GetUniqueCode');

 

   Set TableName = '$(MyVar)';

   EXPORT_TABLE:

   Load

   Column1,

   Column2,

   Column3,

   Column4

   FROM YourPathandTableName Where YourCode = '$(TableName)';

   Store EXPORT_TABLE into YourPath\Exporting_Table_$(TableName).qvd](qvd);

   Drop Table EXPORT_TABLE;

 

   Set MyVar = Null();

   Set TableName = Null();

 

Next

Drop Table GetUniqueCode;

tomasz_tru
Specialist
Specialist

You can use this subroutine: Subroutines in load script

Readability will be high, and minimum code modification needed.

Tomasz