Adding Enriched Data to a Unified Dataset
Use a transformation to add enriched data to the unified dataset.
After you have run enrichment on a unified dataset, you can apply a transformation to join the fields in the enriched output to the unified dataset.
To add enriched data to a unified dataset:
- Open the schema mapping or mastering project to which you want to add the enriched data.
- On the Unified Dataset page, create the unified attributes added by enrichment. For example, for the transformation below, you would create the attributes
phone_country_code, and so on. See Mapping Unified Attributes for instructions.
- Select Show Transformations.
The transformation panel opens with dropdowns for adding transformations. See Accessing Transformations.
- Select Add Transformation for the unified dataset and then select Script.
- In the Edit Code box, write a
JOINfunction to add the fields from the enriched dataset to the unified dataset, as shown in the example below. See the Transformations Join documentation for instructions on writing the function.
LEFT OUTER JOIN WITH enrichment_output_dataset as results on get(enrichment_input_dataset_primary_key,0) == results.tamr_id; select *, results.valid as valid, results.country_code as phone_country_code, results.cleaned_number as cleaned_number, results.national_format as national_format, results.international_format as international_format, results.region as region, results.type as type, results.carrier as carrier;
- Select Update Unified Dataset to run the transformation and update the unified dataset.
Updated 7 months ago