Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Script doubts -RESIDENT,rename ,drop

EMPTemp:
LOAD * INLINE [Ename,Employee_number
'A',1
'B',2
'C',3
'D',4
'E',5
'F',6
];

EMP_TBL:
LOAD
Ename,Employee_number  AS Emp_number
RESIDENT EMPTemp;

drop table EMPTemp;

Why should I drop EMPTemp?
Why should I rename Employee_number to other name Emp_number in EMP_TBL?
What RESIDENT will do?

I think forum gurus will share more things than product manuals.

Kindly explain.

1 Solution

Accepted Solutions
MVP
MVP

Re: Script doubts -RESIDENT,rename ,drop

1) When you are loading Data from previously loaded table in QlikView Script, you should use Resident Load

2) If you not drop the EXPTemp, there are two tables in the data model associated (Linked) with Field Ename

3) If you don't rename the Field Employee_number to Emp_number, the two tables would be concatenated automatically as in QlikView Script, this tables having same field name and same number of columns...Also when you drop the First Table, the 2nd Table which is now a part of 1st table will also be dropped, so you don't have data in your data model..

Hope this will help

4 Replies
MVP
MVP

Re: Script doubts -RESIDENT,rename ,drop

1) When you are loading Data from previously loaded table in QlikView Script, you should use Resident Load

2) If you not drop the EXPTemp, there are two tables in the data model associated (Linked) with Field Ename

3) If you don't rename the Field Employee_number to Emp_number, the two tables would be concatenated automatically as in QlikView Script, this tables having same field name and same number of columns...Also when you drop the First Table, the 2nd Table which is now a part of 1st table will also be dropped, so you don't have data in your data model..

Hope this will help

Re: Script doubts -RESIDENT,rename ,drop

Hi,

Follow this

http://community.qlik.com/docs/DOC-6562

Regards

ASHFAQ

sujeetsingh
Honored Contributor III

Re: Script doubts -RESIDENT,rename ,drop

Let there be two Tables as

Table1

OrderID

Shop

DeliveryDate

Status

Table2

OrderID

ProductID

DeliveryDate

Status

Quantity

Now if you load this two tables in script there will be three association key as OrderID,DeliveryDate and Status.

Now if You want to Join them only on OrderID then rename the DeliveryDate  and Status.

Resident load is also used to reuse already in-memory loaded tables.

Mainly this is been used in transformation, Calculation, using Qlikview functions with Select query etc

Re: Re: Script doubts -RESIDENT,rename ,drop

In this instance I would use a preceding load though.


EMP_TBL:

LOAD

Ename,Employee_number  AS Emp_number

;

LOAD * INLINE [Ename,Employee_number
'A',1
'B',2
'C',3
'D',4
'E',5
'F',6
];