Hello !
Thank you for posting on Microsoft Learn.
You need to use 2 sources :
- Source 1: your main dataset (original dataset)
- Source 2: the reference table (with columns like TABLE96_EHR_VALUE, TABLE96_DISCRIMINATOR, and TABLE96_CODE)
Then you'll need three separate lookup transformations, one for each discriminator:
- a lookup for FUNDINGTYPE with Discriminator = "B"
OriginalDataset.FUNDINGTYPE == Reference.TABLE96_EHR_VALUE
and use a derived column in reference source or filter before join:
TABLE96_DISCRIMINATOR == "B"
Bring in TABLE96_CODE as FUNDINGTYPE_CODE (as an output column).
- a lookup for GSDWAIVER with Discriminator = "G"
OriginalDataset.GSDWAIVER == Reference.TABLE96_EHR_VALUE
and use a derived column in reference source or filter before join:
TABLE96_DISCRIMINATOR == "G"
Then the output column should be GSDWAIVER_CODE.
- finally a lookup for FUNDINGSOURCE with Discriminator = "W"
OriginalDataset.FUNDINGSOURCE == Reference.TABLE96_EHR_VALUE
and use a derived column in reference source or filter before join:
TABLE96_DISCRIMINATOR == "W"
Then the output column should be FUNDINGSOURCE_CODE
Each lookup adds a new column (_CODE) with the corresponding TABLE96_CODE. These values now replace or enrich your main dataset.