Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Is there any way to add extra columns without create a new one

i have a table - which have a huge record size

after i load the table, i would like to add some extra columns to this

example :

tableA:

Load * form

[tableA.qvd]

(qvd);

tableB:

Load * ,

year(businessDate) as year ,

month(businessDate) as year ,

resident

tableA;

drop table tableA;

It will create two tables .Is there any function just for add extra columns to a table ?

2 Replies
nagaiank
Specialist III
Specialist III

There is no need to create two tables if you are adding a few colums. You may follow the following script.

TableA:

LOAD *, expression1 as newfield1, expression2 as newfield2;

LOAD * from TableA.qvd (qvd);

where expression1, expression2 generate values for the newfield1 and newfield2.

If you are adding calendar-related fields to a date-field, you may create a new calendar file linked by the date-field.

Not applicable
Author

but sometime i may need to do something like :

tableA:

Load *,

month(business_date) as month,

applymap('ABC',column,'No data' ) as CustomerID

form

[tableA.qvd]

(qvd);

tableB:

Load * ,

if (CustomerID ='No Date',columnB,CustomerID ) as CustomerID

resident

tableA;

tableC:

Load * ,

CustomerID & month as budgetkey

resident

tableB;

Is there any any function is good for add extra column /modify the content of the table .