Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Load
HIER_3_KEY AS MEMBER,
HIER_3_DESC AS "MEMBER DESC",
HIER_2_KEY AS PARENT,
HIER_2_DESC AS "PARENT DESC",
'LEVEL 3' AS "MEMBER LEVEL",
'LEVEL 2' AS "PARENT LEVEL",
'1' AS "APPLY ORDER"
FROM
[lib://folder1/folder2/GPC_CODE_MASTER_VW.qvd] (QVD)
WHERE NOT ISNULL (HIER_3_KEY);
Concatenate
Load
HIER_2_KEY AS MEMBER,
HIER_2_DESC AS "MEMBER DESC",
HIER_1_KEY AS PARENT,
HIER_1_DESC AS "PARENT DESC",
'LEVEL 2' AS "MEMBER LEVEL",
'LEVEL 1' AS "PARENT LEVEL",
'1' AS "APPLY ORDER"
FROM
[lib://folder1/folder2/GPC_CODE_MASTER_VW.qvd] (QVD)
WHERE NOT ISNULL (HIER_2_KEY);
It will be good to include volume (number of records) when reporting a performance issue, as in you indicated your Hierarchy statement is taking 1 hour and 15 minutes !!! It is also good to share an screenshot of your data; it helps the helpers, anyhow, it worked for me in a flash, obviously I was unable to test with 3 millions records, just I mocked a data sample preserving your columns names while using continents-countries-state-city hierarchy up to four levels.
I referenced these articles:
This is the mock-up data inserted into the headers you provided.
This is the Hierarchy table produced.
This is the load script:
NoConcatenate
Source_Data:
LOAD
HIER_3_KEY As Member,
HIER_3_DESC As NodeName, // Member_Desc,
HIER_2_KEY As Parent,
Null() /* HIER_2_DESC */ As Parent_Desc,
"LEVEL 3" As Member_Level,
"LEVEL 2" As Parent_Level,
'1' As ApplyOrder
FROM [lib://Hierarchy/Hierarchy-Sample.xlsx]
(ooxml, embedded labels, table is Sheet1);
NoConcatenate
H_Data:
Hierarchy(Member, Parent, NodeN_deame, 'My_Parent','My_Node', 'My_Path', '\', 'My_Depth')
Load *
Resident Source_Data;
Drop Table Source_Data;
Hope this helps,
Best regards,
It will be good to include volume (number of records) when reporting a performance issue, as in you indicated your Hierarchy statement is taking 1 hour and 15 minutes !!! It is also good to share an screenshot of your data; it helps the helpers, anyhow, it worked for me in a flash, obviously I was unable to test with 3 millions records, just I mocked a data sample preserving your columns names while using continents-countries-state-city hierarchy up to four levels.
I referenced these articles:
This is the mock-up data inserted into the headers you provided.
This is the Hierarchy table produced.
This is the load script:
NoConcatenate
Source_Data:
LOAD
HIER_3_KEY As Member,
HIER_3_DESC As NodeName, // Member_Desc,
HIER_2_KEY As Parent,
Null() /* HIER_2_DESC */ As Parent_Desc,
"LEVEL 3" As Member_Level,
"LEVEL 2" As Parent_Level,
'1' As ApplyOrder
FROM [lib://Hierarchy/Hierarchy-Sample.xlsx]
(ooxml, embedded labels, table is Sheet1);
NoConcatenate
H_Data:
Hierarchy(Member, Parent, NodeN_deame, 'My_Parent','My_Node', 'My_Path', '\', 'My_Depth')
Load *
Resident Source_Data;
Drop Table Source_Data;
Hope this helps,
Best regards,