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: 
arhadisqlik
Contributor II
Contributor II

Nonconcatenate load followed by Drop table and rename

Hi there 

I have inherited a script from a former colleague and  there are a some code lines I am confused about; they seem redundant to me:

Step 1: He joins two tables:

JOIN(KEYS_tmp)

load distinct * resident ExcelDetails

Step 2: He creates a new table KEYS_tmp2

KEYS_tmp2:

NONCONCATENATE LOAD * resident KEYS_tmp

Step 3: 

DROP table KEYS_tmp

RENAME TABLE KEYS_tmp2 to KEYS_tmp;

Now, why create KEYS_tmp2 in the first place since nothing is done data wise when loading data into it from KEYS_tmp.

I am pretty new to Qlikview and there's probably  a good reason for doing this....

Could anybody in this forum enlighten me?

Thanks in advance 

Best regards 

Anders

 

5 Replies
marcus_malinow
Partner - Specialist III
Partner - Specialist III

Steps 2 and 3 look to be completely redundant

PrashantSangle

Is he doing any operation on "KEYS_tmp" after step 3???
if no then you can avoid step 2 and 3
if yes then yes it is required.

Regards,
Prashant Sangle
Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
arhadisqlik
Contributor II
Contributor II
Author

Hi Prashant - and thank you for the reply 🙂

Yes he joins more tables on the renamed KEYS_tmp.

Why is it not possible to just continue joining to the KEYS_tmp from step1?

Thanks again

Br

Anders

marwen_garwachi
Creator II
Creator II

 

 

Try to add a fake column to the table KEYS_tmp2

OIN(KEYS_tmp)

load distinct * resident ExcelDetails

Step 2: He creates a new table KEYS_tmp2

KEYS_tmp2:

NONCONCATENATE LOAD * , '1' as Fakecolumn resident KEYS_tmp

Step 3: 

DROP table KEYS_tmp ;

drop field Fakecolumn ;

RENAME TABLE KEYS_tmp2 to KEYS_tmp;

Let us know if that works  😉 

sunny_talwar

I think if there are no transformations happening in step2, then step2 and step3 are redundant and should be removed.