
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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]);


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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]);


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you Enrique for the solution and the explanation.
MV

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, that's what I had Sarvesh.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
