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

QVD for multiple applications

Hi, I want to create a QVD and use one QVD for multiple applications.
If I have app A and app B, I want to clone app A to generate app B, and use the QVD file created by app A for app B.

When I wrote Load in the load script of application B, the table that was originally in application A already existed in the duplicated application B, so the table was duplicated.

Should I drop the table that was originally in app A?
In that case, I am in trouble because the association disappears.

Thank you for your help.

9 Replies
MayilVahanan

Hi

If you generate the QVD from A and then y u duplicates it and name, it as "B"?

You can load the QVD in new app which was generated by app A and do the transformation based on business logic.

Or, if you are using Binary load of A in B, then based on the business scenario, you can drop the table and load it from qvd.

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
luke3
Contributor II
Contributor II
Author

Thank you for reply.

>If you generate the QVD from A and then y u duplicates it and name, it as "B"?
Yes.

>You can load the QVD in new app which was generated by app A and do the transformation based on business logic.
I wanna try this.
What do you mean "based on business logic" ?

I worked with the following steps.
Step 1: Generate QVD with the following script in application A.
Step 2: Load QVD into new app B generated by app A
-> How can I load the QVD file created in the new application B?

<QVD create script for all table>
For i=NoOfTables() To 0 Step -1
Let vTableName = TableName($(i));
    If Not isNull(NoOfRows('$(vTableName)')) Then
    Store $(vTableName) Into [lib://DataFiles/$(vTableName).qvd](qvd);
    EndIf
Next
MayilVahanan

Hi

<QVD create script for all table>
For i=NoOfTables() To 0 Step -1
Let vTableName = TableName($(i));
    If Not isNull(NoOfRows('$(vTableName)')) Then
    Store $(vTableName) Into [lib://DataFiles/$(vTableName).qvd](qvd);
    EndIf
Next
 
This one already generated the qvd, so no need this logic in App B.
You can remove those lines and you can load the qvd in App B. or are u generating any other additional qvd?
Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
luke3
Contributor II
Contributor II
Author

Hi

Yes, I can remove this script in App B.
I don't wanna generate any other additional qvd. I just wanna use the qvd in App B.

But how should I write script in the new app B script to recognize the generated QVD file?

Like this?
Load * from [lib://DataFiles/xxx.qvd](qvd);

luke3
Contributor II
Contributor II
Author

And the new App B data connection does not need to connect to a database such as Redshift, right?

MayilVahanan

Yes, for both of your questions

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
luke3
Contributor II
Contributor II
Author

Thank you very much.
However, in the auto-generated script for application B, there is still a description to bring data from Redshift like application A, so the tables will be duplicated.

How should I edit the description of the auto-generated script for application B? Unlock and edit scripts?

aaa.png

bbb.png

  

MayilVahanan

Yes, you can unlock the scripts and remove the existing one..

Or, you can create new app and load the QVDs from the datafiles folder.

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
luke3
Contributor II
Contributor II
Author

>Yes, you can unlock the scripts and remove the existing one..

In that case, the association will disappear.
Do I have to re-associate for each app? I'd like to avoid that because it's troublesome for maintenance.