Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
asb02512
Contributor III
Contributor III

Synthetic Key issue

How to resolve the synthetic key issue for the below shown model viewer. Need both Columns SL_DATE and VNDR_GROUP.

Untitled.jpg

5 Replies
girirajsinh
Creator III
Creator III

You may rename VNDR_GROUP of SALES_RETURN_HDR to SRH_VNDR_GROUP

update

Also you may need to create extra composite key SL_DATE+VNDR_GROUP, depending on relation between SALS_HDR and SALES_RETURN_HDR

asb02512
Contributor III
Contributor III
Author

Dear Giri

My Requirement is to link the "VNDR_DTL.VNDR_GROUP "WITH VNDR_GROUP of both SALES_HDR and SALES_RETURN_HDR. But to get the Exact Data as per Date i have to link the DATE as well with both the HDR tables. when i am doing this i am getting a synthetic key. How to resolve this issue? as per your reply i am not getting the exact data (I TRIED ALREADY). is there any solution that we can solve this using Qualify and Unqualify.

SL_DATE : is

SALE_DATE as SL_DATE

SALE_RETURN_DATE as SL_DATE

in master Calendar date is configured as  SL_DATE


Then How can a extra composite key will create ?

danansell42
Creator III
Creator III

You could concatenate the Sale and Sale Return tables together creating a singular fact table.

This would remove the synthetic key.

girirajsinh
Creator III
Creator III

Ok

will there be same vendor value for sales header and sales return entry ? if so you don't need to connect to both ,right ? just connect to sales_hdr

if venor can be different for both hdr and return, then

left join(sale_hdr) to vendr_dtl

and left join(sale_retun_hdr) to vendr_dtl

Thus there wont be vendr_dtl table and yes you will need to qualify both tables except for SL_DATE key

girirajsinh
Creator III
Creator III

concatenation ? or left join(sales_fact) both fact tables? (yes if his vendor for boh same, which is more likely)