Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Why does NoConcatenate create a synthetic key ?

Hello,

In my simple QVW script I have two identical Excel sheets (the number of columns and the column names are the same) which I am loading into two tables - Table A and Table B.

I prefix my load of Table B with the NOCONCATENATE statement so the rows will load into their respective tables, which they do.

TableA:

LOAD *

FROM Data\Test.xlsx (ooxml, embedded labels, table is [Sheet A]);

NoConcatenate

TableB:

LOAD *

FROM Data\Test.xlsx (ooxml, embedded labels, table is [Sheet B]);

Can someone please explain why this generates a synthetic key ? I thought the NoConcatenate  statement prevented this.

Thanks

MV

1 Solution

Accepted Solutions
ecolomer
Master II
Master II

If you have the same field names, QV create an relation and synthetic keys.

For separate name use QUALIFY

QUALIFY *;

TableA:

LOAD *

FROM Data\Test.xlsx (ooxml, embedded labels, table is [Sheet A]);

NoConcatenate

TableB:

LOAD *

FROM Data\Test.xlsx (ooxml, embedded labels, table is [Sheet B]);

View solution in original post

6 Replies
ecolomer
Master II
Master II

If you have the same field names, QV create an relation and synthetic keys.

For separate name use QUALIFY

QUALIFY *;

TableA:

LOAD *

FROM Data\Test.xlsx (ooxml, embedded labels, table is [Sheet A]);

NoConcatenate

TableB:

LOAD *

FROM Data\Test.xlsx (ooxml, embedded labels, table is [Sheet B]);

sarvesh
Creator III
Creator III

Syntax of Nonconcatenate is mentioned below please check:

LOAD a, b, c from table1.csv;

noconcatenate LOAD a, b, c from table2.csv;

Regard's

sarvesh Srivasrava

Not applicable
Author

Thank you Enrique for the solution and the explanation.

MV

Not applicable
Author

Yes, that's what I had Sarvesh.

jwaligora
Creator II
Creator II

Hi. I realize this is an ancient thread, but on the off chance you're still around...

When Qualify * is used, the behaviour appears to be the same regardless of whether or not NoConcatenate is also applied.  What are use cases in which NoConcatenate would actually make a difference?