Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Tried renaming fields, still gives synthetic key for below query:
//Load Incremental Data
Incremental_Table:
LOAD
PICKTICKET#,
SHIP_TO_COUNTRY,
PLANNED_SHIP_VIA,
TOTAL_NO_OF_CARTONS,
PKMS_USERS,
CASE#,
TO_LOCATION,
MENU_OPTION_NAME,
FROM_LOCATION,
STYLE,
UNITS#,
DATE_STRING,
TIME_STRING,
DATE_TIME_STRING,
USER_NAME,
Date(Date#(DATE_STRING,'YYYYMMDD'),'MM/DD/YYYY') as DATE;
SQL Select....
FROM "\\Glsdwcfs02002\qv\QvDev\SrcDocs\2.NAM_Dell\1.QVD\MOD3_Data_Source.QVD" (QVD)
Hours_Associate:
LOAD USER_NAME
FROM "\\Glsdwcfs02002\qv\QvDev\SrcDocs\2.NAM_Dell\1.QVD\MOD3_Data_Source.QVD" (QVD)
;
LEFT Join(Hours_Associate)
Hour_Information:
LOAD * Inline [
SUPERVISOR, USER_NAME, HOURS, DATE
Charla Hunter,'Eliga Dani' , 8 , 07/16/2018,
Charla Hunter,'Karen Ector' , 8 , 07/16/2018,
Charla Hunter,'Lilian Fares' , 8 , 07/16/2018,
];
My bad, vishsaggi is right... use DATE instead of DATE_STRING... But like this
Hours_Associate:
LOAD *,
USER_NAME&Date(DATE, 'MM/DD/YYYY') as UserDateKey
Resident Hours_Associate_Temp;
DROP Table Hours_Associate_Temp;
DROP Fields USER_NAME, DATE From Hours_Associate;
What is your joining key between these two tables. You can rename your Username from Hours Associate table to a new name or the Date. LIke
Hour_Information:
LOAD *, USER_NAME as Name, DATE as InfoDate Inline [
SUPERVISOR, USER_NAME, HOURS, DATE
Charla Hunter,'Eliga Dani' , 8 , 07/16/2018,
Charla Hunter,'Karen Ector' , 8 , 07/16/2018,
Charla Hunter,'Lilian Fares' , 8 , 07/16/2018,
];
May be this
//Load Incremental Data
Incremental_Table:
LOAD
PICKTICKET#,
SHIP_TO_COUNTRY,
PLANNED_SHIP_VIA,
TOTAL_NO_OF_CARTONS,
PKMS_USERS,
CASE#,
TO_LOCATION,
MENU_OPTION_NAME,
FROM_LOCATION,
STYLE,
UNITS#,
DATE_STRING,
TIME_STRING,
DATE_TIME_STRING,
USER_NAME,
Date(Date#(DATE_STRING,'YYYYMMDD'),'MM/DD/YYYY') as DATE,
USER_NAME&Date(Date#(DATE_STRING,'YYYYMMDD'),'MM/DD/YYYY') as UserDateKey;
SQL Select....
FROM "\\Glsdwcfs02002\qv\QvDev\SrcDocs\2.NAM_Dell\1.QVD\MOD3_Data_Source.QVD" (QVD)
Hours_Associate_Temp:
LOAD USER_NAME
FROM "\\Glsdwcfs02002\qv\QvDev\SrcDocs\2.NAM_Dell\1.QVD\MOD3_Data_Source.QVD" (QVD);
LEFT Join(Hours_Associate_Temp)
Hour_Information:
LOAD * Inline [
SUPERVISOR, USER_NAME, HOURS, DATE
Charla Hunter,'Eliga Dani' , 8 , 07/16/2018,
Charla Hunter,'Karen Ector' , 8 , 07/16/2018,
Charla Hunter,'Lilian Fares' , 8 , 07/16/2018,
];
Hours_Associate:
LOAD *,
USER_NAME&DATE as UserDateKey
Resident Hours_Associate_Temp;
DROP Table Hours_Associate_Temp;
DROP Fields USER_NAME, DATE From Hours_Associate;
Still gives the synthetic key,
It does not give the hours information I tried to join through inline.
I am not sure what that means.... did you drop the Hours_Associate table also?
Nope, I did not drop the Hours_Associate.
The HOURS field do not show up in the straight table which had showed up earlier when the synthetic keys were generated.
Image of the new data model? I have not dropped the Hours field from the script I shared... I wonder what happened?
It shows up in a list box, but when I use the same field in a straight table, it gives blanks.
May be try this
Hours_Associate:
LOAD *,
USER_NAME&Date(Date#(DATE_STRING,'YYYYMMDD'),'MM/DD/YYYY') as UserDateKey
Resident Hours_Associate_Temp;
DROP Table Hours_Associate_Temp;
DROP Fields USER_NAME, DATE From Hours_Associate;