Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Morgoz
Contributor III
Contributor III

Qlik Sense not concatenating. Synth key with all fields.

Hello,

I have loaded a table from a QVD file (which by now is empty) and then I have created another table in the script using preceding loads, with exactly the same field names as the one from the QVD.

I expected Qlik Sense to automatically concatenate both tables, but it has created a huge synth key with all the fields of both tables, so in the model view there are no "own" fields in any table and all fields in the synth key:

Morgoz_0-1628587372946.png

What am i missing?

Thank you.

4 Replies
Taoufiq_Zarra

@Morgoz  can you share the load script ?

and if you use concatenate ?

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
stevejoyce
Specialist II
Specialist II

Like @Taoufiq_Zarra  mentioned, use concatenate().  Sometimes it's handy to short-hand in a loop, letting it auto-concatenate, but it will make you and colleague's jobs harder to maintain/troubleshoot when you have to remember what tables are auto-concatenating when it's easy as concatenate(<tablename>)

Morgoz
Contributor III
Contributor III
Author

Thank you for the responses,

yes, finally I forced the concatenation with "concatenate" and everything is working, but the thing is that I can't understand whay is Qlik Sense not concatenating automatically.

Here are the script loading sections for those tables:

 

DQ_FACTS_QVD_INIT:
Load * 
FROM [lib://DQs_QVDs/DQ_FACTS_DRV.qvd] (qvd)
where Num(EXEC_DATE_SQL_QVD)<$(fecha_ejecucion_num)
;

 

That sentence returns an empty DQ_FACTS_QVD_INIT table.

 

DQ_FACTS_INIT:    
    Load *, 
   	    If(ERROR_TYPE_QVD='Creation', ID_DQ_COUNTS_aux & '-' & 'Yes', ID_DQ_COUNTS_aux & '-' & 'All') AS ID_DQ_COUNTS_QVD;        
    Load *,  
   	TYPE_ID & '-' & Text(DATE(EXEC_DATE_SQL,'YYYYMMDD')) AS ID_DQ_COUNTS_aux,	if(date(CREATION_DATE,'DD/MM/YYYY')=Date($(fecha_analizada_num),'DD/MM/YYYY'),'Creation','Modification') as ERROR_TYPE_QVD
   	Resident DQ_DRIVER;
       	Drop Fields ID_DQ_COUNTS_aux from DQ_FACTS_INIT;

 

 

More or less those are the sections where tables are loaded, for simplicity I have not included all fields.

Salutes!

 

stevejoyce
Specialist II
Specialist II

It looks like in the 2nd load DQ_FACTS_INIT you have an extra column being loaded "ID_DQ_COUNTS_aux" that you drop after.  But the auto-concatenate would happen when the table is created in memory.