Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
gcislo
Partner - Contributor II
Partner - Contributor II

Auto Table combination

Hello, I am new to Qlik, and I am running into a problem with the data load editor. I have multiple instances and I need to pull a log from each and keep them separate, but Qlik is auto combining the two tables and dropping information. Is there a way to tell Qlik not to associate the two tables? Renaming each field would be very tedious. An example is ABC_log1 needs to be its own table and DEF_log1 needs to be its own table even though they have the same table names and fields stored inside them. The requirements also calls for it to be the same application so I can't make a separate app for each instance. Does anyone have any ideas?

Labels (2)
1 Solution

Accepted Solutions
PhanThanhSon
Creator II
Creator II

Hi,

I believe the phenomenon you're experiencing is called auto-concatenation, which occurs when Table A and Table B have identical field names.

There are several ways to prevent concatenation:

Method 1:

TableA:
Load *
From lib://Test/TableA.qvd;

NoConcatenate
TableB:
Load *
From lib://Test/TableA.qvd;

Here, you'll get synthetic keys, which may corrupt your data model, but you'll have two separate tables.

 

Method2:


TableA:
Load *,
'A' As Flag
From lib://Test/TableA.qvd;

Concatenate(TableA)
TableB:
Load *,
'B' As Flag
From lib://Test/TableA.qvd;

You merge the tables, but based on the flag, you know which table you're currently addressing.

Method 3:

Qualify *;
Unqualify '%*';
TableA:
Load *
From lib://Test/TableA.qvd;


TableB:
Load *
From lib://Test/TableA.qvd;




Unqualify *;

Here, all fields are named with the table prefix, for example, TableA.Field1. Key fields marked with % according to Qlik notation do not have a prefix here.

I hope this helps you.

 

Best regards Son

View solution in original post

2 Replies
PhanThanhSon
Creator II
Creator II

Hi,

I believe the phenomenon you're experiencing is called auto-concatenation, which occurs when Table A and Table B have identical field names.

There are several ways to prevent concatenation:

Method 1:

TableA:
Load *
From lib://Test/TableA.qvd;

NoConcatenate
TableB:
Load *
From lib://Test/TableA.qvd;

Here, you'll get synthetic keys, which may corrupt your data model, but you'll have two separate tables.

 

Method2:


TableA:
Load *,
'A' As Flag
From lib://Test/TableA.qvd;

Concatenate(TableA)
TableB:
Load *,
'B' As Flag
From lib://Test/TableA.qvd;

You merge the tables, but based on the flag, you know which table you're currently addressing.

Method 3:

Qualify *;
Unqualify '%*';
TableA:
Load *
From lib://Test/TableA.qvd;


TableB:
Load *
From lib://Test/TableA.qvd;




Unqualify *;

Here, all fields are named with the table prefix, for example, TableA.Field1. Key fields marked with % according to Qlik notation do not have a prefix here.

I hope this helps you.

 

Best regards Son

gcislo
Partner - Contributor II
Partner - Contributor II
Author

Thank you! I will try all three methods and see which one works best.