Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi all,
Iam trying to use Qualify and then unqualfy the table.. But Iam getting 4 times the tables are getting in the Data model?
For ex:
Qualify*,;
[SAP]:
LOAD
Plant
[Year],
[Month],
[Material] as [Material],
[[Quantity]
FROM
C:\\SAP*.xlsx]
(ooxml, embedded labels, table is Sheet1);
Unqualify*,;
The out put is
SAP1.Plant
SAP1.Year
SAP1.Month
SAP1.Material
SAP1.Material
SAP1.Quantity
SAP2.Plant
SAP2.Year
SAP2.Month
SAP2.Material
SAP2.Material
SAP2.Quantity
SAP3.Plant
SAP3.Year
SAP3.Month
SAP3.Material
SAP3.Material
SAP3.Quantity
SAP4.Plant
SAP4.Year
SAP4.Month
SAP4.Material
SAP4.Material
SAP4.Quantity
and one more as below
SAP.Plant
SAP.Year
SAP.Month
SAP.Material
SAP.Material
SAP.Quantity
Try this:
[TEMP]:
LOAD
Plant
[Year],
[Month],
[Material] as [Material],
[[Quantity]
FROM
C:\\SAP*.xlsx]
(ooxml, embedded labels, table is Sheet1);
QUALIFY *;
SAP:
NoConcatenate
LOAD *
Resident TEMP;
DROP Table TEMP;
UNQUALIFY *;
the results are not good.. can i unqualfy material and plant so they get concatenated,,,
May be like this?
[TEMP]:
LOAD
Plant
[Year],
[Month],
[Material] as [Material],
[[Quantity]
FROM
C:\\SAP*.xlsx]
(ooxml, embedded labels, table is Sheet1);
QUALIFY *;
SAP:
NoConcatenate
LOAD *
Resident TEMP;
DROP Table TEMP;
UNQUALIFY *;
qualify will rename all your columns except those you unqualify to take the name of the table.column if you are getting multiple tables means your loading and naming multiple load with the same table name so even if you qualify /unqualify you will likely still get multiple SAP. if you are planning to add data to an existing table use:
Concatenate('tablename') Load * from file;
This will add data to the existing table.
[tmp]:
noconcatenate
Load * from file1
concatenate ('tmp')
load *
from file2
qualify *;
unqualify Material, Plants;
[SAP]:
NoConcatenate
Load * resident tmp;
This will craete tmp from file 1, add file2's data to tmp, create a table for sap with all except material and plants, being rename to sap.columname result:
sap<--table
sap.year
sap.month
sap.quantity
plant
material
If you have another table that has plant, or material
they will asscociate join themselves