Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Load Data into QVD File to another QVD file..

Hi All,

How to add new column into existing qvd file?.

For ex,

I have 3 years data into Customer_qvd.qvd (qvd) file in production server, in this qvd file contain Customer_ID,Customer_name,Location,Region_CD …. Reporting purpose now I want add new column in this qvd file.

When I am adding new column before taking backup and new creating  new qvd file, now how load data from old qvd file to new qvd file(qvd to qvd) and how fill the value into new column.Here no data source getting data from like oracle,sql. Cusomer_qvd file maintain historical data.

Regards.

raja.

1 Solution

Accepted Solutions
Colin-Albert

Use mapping functions to add the new column.

// create the mapping table

NewDataMap:

Mapping load

Customer_ID,

New_field

From <new data source> ;

//reload data and add new column

Customers:

LOAD *,

Applymap('NewDataMap', Customer_ID) as NewFieldName

From Customer.QVD (qvd) ;

//save updated data to qvd

Store Customers into Customer.qvd (qvd) ;

View solution in original post

9 Replies
Not applicable
Author

Hi All,

Please assit above question.

How to load data into one qvd file another qvd file..

Regards,

Raja.

manojkulkarni
Partner - Specialist II
Partner - Specialist II

Load Customer.qvd first, then do inner join on CustID. Assuming CustId will be unique key to make link between both qvds.

Then re-create customer qvd with final table created after joining necessary data from second table.

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

DataFromQVD:

LOAD

*,

1 AS New Column

FROM Data.qvd;

STORE DataFromQVD into Data.qvd;

Regards,

Jagan.

Not applicable
Author

Hi Jagan,

Good Idea, thank you so much.

But i want fill data into new_column also please help me.

Regards,

raja.

jagan
Luminary Alumni
Luminary Alumni

Hi,

Can you come up with a sample data and your expected output, it helps in understanding the scenario.

Regards,

Jagan.

Not applicable
Author

Hi Jagan,

That new column adding into hard code value something like “this is reference ID” for all rows. Here no conditional(like where class) at all.

Regards,

Raja.

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

DataFromQVD:

LOAD

*,

“this is reference ID” AS New Column

FROM Data.qvd;

STORE DataFromQVD into Data.qvd;

Regards,

Jagan.

Colin-Albert

Use mapping functions to add the new column.

// create the mapping table

NewDataMap:

Mapping load

Customer_ID,

New_field

From <new data source> ;

//reload data and add new column

Customers:

LOAD *,

Applymap('NewDataMap', Customer_ID) as NewFieldName

From Customer.QVD (qvd) ;

//save updated data to qvd

Store Customers into Customer.qvd (qvd) ;

Not applicable
Author

If the new column is just Hard coded value , why you need another big qvd in the first place ?

You can use existing qvd for both purposes.