Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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:
What am i missing?
Thank you.
@Morgoz can you share the load script ?
and if you use concatenate ?
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>)
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!
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.