To build relationships between the data models of your systems of record, you can create mapping groups. Mapping groups define the rules to apply to transform values from one system to another, which apply as Mapping transformations in pipelines.
Tip: To quickly create a mapping group with similar columns and rules as another group, from Mapping groups create a duplicate of the existing group.
, click Copy to
Requirements
Data Prep is controlled entirely at the org level and does not recognize individual workspaces or their permissions.
This means:
- Data Prep is shared among all authorized users in your org.
- Any user with access to Chain Builder also has access to Data Prep.
- All users who can create or edit chains will have the ability to manage pipelines in Data Prep.
- A single Data Prep pipeline can be used across multiple chains and workspaces within an organization.
Step 1. Create the mapping group
- From Wdata Chains, click Data Prep.
Note: To access Data Prep from Wdata Chains, first set up a Data Prep connector.
- From Mapping groups
- If the first mapping group, click Create mapping group.
- Otherwise, click New mapping group under Mapping groups.
, add the mapping group:
- Enter a name and description to help identify the mapping group.
- Click Create.
Step 2. Define the primary column
When you first create a mapping group, it has a default primary column named Value. A Mapping transformation changes the contents of this primary column when the pipeline runs. To update the primary column to match its corresponding column in the pipeline:
- On the mapping group's Columns
- Under Define columns, edit the primary column's data type or name as necessary.
- Click Save.
Step 3. Define additional columns for conditional rules
To help support the transformation of the primary column, define any additional columns required for conditional rules.
Note: When the pipeline runs, the Mapping transformation changes only the primary column, not any additional columns.
- On the Columns tab , click Edit columns.
- Under Define columns, click Add columns for each column to add.
- For each column of the mapping group, specify the data type and name of its corresponding column in tabular data transformed by the pipeline.
- When all columns are defined, click Save.
Step 4. Set up mapping rules
Mapping rules define how—and when—to change the primary column based on values in the tabular data transformed by the pipeline. You can manually set up rules or upload them as a comma-separated values (CSV) file.
Tip: To enable a preview of how the rules impact the primary column, from the Files tab, pin a sample file to the mapping group.
To manually set up each mapping rule:
- On the Rules select how to map values:
- Exact, to map based on an exact match
- Like, to map based on a simple pattern
- Regex, to map based on a regular expression
tab, click Add, and - In From, enter the criteria of source values from the primary column to transform.
- In To, enter how to transform values that match the From criteria.
Tip: To enable flexibility, you can select variables create runtime variables.
for the From or To values. To prompt for these values when the pipeline runs, - To apply any conditional mapping, in Conditions, set up when to apply the rule.
- To help identify the rule, enter its name and description.
- In Position, enter the order in which the rule should apply.
- On the Properties tab, specify whether the rules are case-sensitive, trim whitespace, or apply only during a specific time period.
- Click Save, verify the rules are set up correctly, and click Save.
Note: When you upload rules, they replace any existing rules set up for the mapping group.
To upload mapping rules, first create a CSV with the rules to upload, or download the rules from another mapping group:
- To create a CSV, select the Rules
Note: To avoid formatting in the CSV file, open it in a text editor such as Notepad++, or select Get data in Microsoft Excel® to import it into a workbook.
tab, click Download, and update the file with each mapping rule's type, To and From values, position, and other details.
- To upload rules from an existing group, on that group's Rules tab, click Download to generate a CSV of its rules.
When you have the CSV, upload it to the new mapping group:
- On the Rules tab, click Upload.
- Drag or browse to the CSV, and click Submit.
- On the Properties tab, specify whether the rules are case-sensitive, trim whitespace, or apply only during a specific time period.
Step 5. Publish and use the mapping group
After you set up all mapping rules, click Publish to enable pipelines to use the group.
To use the group in a pipeline:
- When you add a transformation to the pipeline, select Mapping, and click Next.
- Select the mapping group.
- Under Match columns, select which of the pipeline's columns map to the group's.
- Click Save.