Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
balanandam
Creator II
Creator II

Add new column to QVD

Hi all,

I have a new column added to my source database, and that should be pulled out to qlikview and append to existing qvd. what is the best way to do this ?

I know the method, run full extract and create qvd starting onwards, but the data size is in very big that takes hours to complete this. As now I am loading data incremental manner to qlikview. Pls. suggest.

Br, Balanandam

16 Replies
chrishayes
Contributor III
Contributor III

From what I've read here so far, it seems the column was added to a table in the source system, but the existing rows should have no value. Only new rows created will have a value. Update your existing incremental load script to accommodate the new column in the source table. Create a one-time QVD loader that loads the existing QVD and adds the new column:


          LOAD

               *,

               Null() as New_Column

          FROM

               MyData.qvd

          ;


Write out the QVD with the new column as all nulls. Then you can deploy your modified incremental load script and new and updated rows will come in with the new column populated.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Just simply add the new column to your extract. When you merge with the existing QVD, use the Concatenate keyword on the Load statement.

Concatenate (Facts)

LOAD * facts.qvd

where not exists(key);

STORE Facts into....

You can remove the Concatenate prefix after one run if desired.

-Rob

http://masterssummit.com

http://qlikviewcookbook.com

big_dreams
Creator III
Creator III

Hi Sir,

with all due respect, I don't get it how it can be optimize way to achieve it.

1st thing we can not use exist() in database query for that we have to load all data from database to temp qvd then

concatenate it to existing qvd using not exist. So if we are loading all data in temp qvd then why we are not using directly.

might there is some thing in your logic which i don't get it. Can you explain it little bit more. I am interested to learn it.

Sorry if I say anything wrong.

Regards,

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

The original poster stated that he was using incremental load so I assume he had a QVD that held the rows to date. The new rows, picked up by incremental load, will have the new column.  I was suggesting that he did not need to worry about adding the new column to the existing rows in the QVD.  QV will assign nulls values to the existing rows automatically.

-Rob

big_dreams
Creator III
Creator III

got it sir..

phapalesaurabh
Partner - Contributor III
Partner - Contributor III

@rwunderlich ,

Is der a way remove to Columns from Qvd Just like this Trick ?

Or Simply to create a model which will drop columns from Qvd ?

I have a requirement to drop a column which is going to be removed from Database and Our data loads are incremental in Qlik.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You can either not load the field when you load the existing QVD or "Load *" followed by "DROP Field X'.

-Rob