Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have tried to load from multiple files 3 tables, which I wanted to concatenate. So I've used the Load From [Path\*.xlsx] (all my files ae xlsx and in the same folder).
Rapport1:
LOAD *
FROM [pahtfield*.xlsx](ooxml, embedded labels, table is [Rapport 1]);
inner join (Rapport1)
LOAD *
FROM
[pathfield\*.xlsx]
(ooxml, embedded labels, table is [Rapport 2]);
But I had no data loaded
Any one can help my with this?
Thank you
May be both the files doesn't have common data. You are using Inner Join.
Regards,
KKR
When you use inner join, the resulting table contains the records that have common values in their key fields. Since you're using *, we cannot see if there are key fields at all. And, if there are - they don't have matching values.
First load your two tables from your sources, then do the inner join in a resident load. Then drop the temporary second table:
RAP1:
LOAD * FROM ...;
RAP2:
LOAD * FROM ...;
INNER JOIN (RAP1) LOAD * RESIDENT RAP2;
DROP TABLE RAP2;
No, I am sure the have common date, when I used only one file it worked, but when i used the path\*.xlsx it didn't
you said concatenate
wanted to concatenate
and in the script you used join
do you want to concatenate or join?
maybe this can help to choose
That's because the JOIN will be performed after each file has been loaded, not after concatenating all files.
If the Key values are exclusive in the files, you'll end up with a empty set.
that is exactly what happening to me. I want to first concatenate the sheets from the files and then join them
Have you tried what I suggested above (First LOAD the two tables, then JOIN the resident tables)?
I don't know how the script two merge to resident tables, can u give me a sample of script please?