Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
haneeshmarella
Creator II
Creator II

How do I remove synthetic key in the below query?

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,

];

SS.PNG

1 Solution

Accepted Solutions
sunny_talwar

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;

View solution in original post

16 Replies
vishsaggi
Champion III
Champion III

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,

];

sunny_talwar

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;

haneeshmarella
Creator II
Creator II
Author

SS.PNG

Still gives the synthetic key,

haneeshmarella
Creator II
Creator II
Author

It does not give the hours information I tried to join through inline.

sunny_talwar

I am not sure what that means.... did you drop the Hours_Associate table also?

haneeshmarella
Creator II
Creator II
Author

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.

sunny_talwar

Image of the new data model? I have not dropped the Hours field from the script I shared... I wonder what happened?

haneeshmarella
Creator II
Creator II
Author

SS.PNG

It shows up in a list box, but when I use the same field in a straight table, it gives blanks.

SS.PNG

sunny_talwar

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;