Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to load multiple files into one single "Orders" table.
The code below loads everything but in several tables : Orders, Orders-1, Orders-2...
How can I force everything into a single table?
LET csvFiles='$(path)'&'*.xlsx';
unqualify key;
Orders:
LOAD
key,
data1
data2,
...
FROM
$(csvFiles)
(ooxml, embedded labels, table is xxx);
I think the unqualify key; has something to do with it as you probably have all your other fields qualified.
¿Am I right?
I think the unqualify key; has something to do with it as you probably have all your other fields qualified.
¿Am I right?
Right, if I write "unqualify *" (which is really not what I want to do), everything loads into a single "Orders" table.
But then it gets messy with the rest of my load (not shown here) as unwanted associations are created.
I can of course rename the fields directly, but there must be a way to combine the use of qualify/unqualify and wildcard files load, or isn't?
If you really want to qualify this table you will need to do it after the loop-load with an noconconatenate load on the loop-table which could be dropped afterwards. Of course this meant an additional load-step but this is one of many costs which you have to pay if you used qualifying especially if the aim is just to prevent unwanted connections - just my personal view on this matter ...
- Marcus
I agree with Marcus, that is the solution or renaming fields as you said before.
Thanks Marcus and Josefina, I ended up discarding the qualify and just renamed my fields one by one.
No more Orders duplicates: