Informatica Cloud Mapping Tutorial for Beginners, Building the First Mapping
In the last couple of articles we discussed the basics of Informatica Cloud and Informatica Cloud Designer. In this tutorial we describe how to create a basic mapping, save and validate the mapping, and create a mapping configuration task. The demo mapping reads and writes data sources, also include the parameterization technique.
The mapping we create here reads source data, filters out unwanted data, and writes data to the target. The mapping also includes parameters for the source connection and filter value. For this tutorial, you can use a sample Account source file available in the Informatica Cloud Community. You can download the sample source file from the following link Sample Source File for the Mapping Tutorial.
Step 1. Mapping Creation and Source Configuration
The following procedure describes how to create a new mapping and configure the sample Account flat file as the source.
- To create a mapping, click Design > Mappings > New Mapping.
- In the New Mapping dialog box, enter a name for the mapping: Account_by_State. You can use underscores in mapping and transformation names, but do not use other special characters.
- To add a source to the mapping, on the Transformation Palette, click Source.
- In the Properties Panel, on the General tab, enter a name for the source: FF_Account.
- On the Source tab, configure the following properties:
- Connection :- Source connection. Select the flat file connection for the sample Account source file. Or, create a new flat file connection for the sample source file.
- Source Type :- Source type. Select Object.
- Object :- Source object. Select the sample Account source file. To preview source data, click Preview Data.
- To view source fields and field metadata, click the Fields tab.
- To save the mapping and continue, on the toolbar, click Save > Save and Continue.
Step 2. Filter Creation and Field Rule Configuration
In the following procedure, you add a Filter transformation to the data flow and define a parameter for the value in the filter condition. When you use a parameter for the value of the filter condition, you can define the filter value that you want to use when you configure the task. And you can create a different task for the data for each state.
The sample Account source file includes a State field. When you use the State field in the filter condition, you can write data to the target by state. For example, when you use State = MD as the condition, you include accounts based in Maryland in the data flow.
- To add a Filter transformation, on the Transformation palette, drag a Filter transformation to the mapping canvas.
- To link the Filter transformation to the data flow, draw a link from the FF_Account source to the Filter transformation. When you link transformations, the downstream transformation inherits fields from the previous transformation.
- To configure the Filter transformation, select the Filter transformation on the mapping canvas.
- To name the Filter transformation, in the Properties panel, click General and enter the name: Filter_by_State.
- To configure field rules, click Incoming Fields. Field rules define the fields that enter the transformation and how they are named. By default, all available fields are included in the transformation. Since we want to use all fields, do not configure additional field rules.
- To configure the filter condition, click Filter.
- To create a simple filter with a parameter for the value, for Filter Condition, select Simple.
- Click Add New Filter Condition.
- For Field Name, select State, and use Equals as the operator.
- For Value, select New Parameter.
- In the New Parameter dialog box, configure the following options and click OK.
- To save your changes, click Save > Save and Continue.
Step 3. Target and Source Parameter Configuration
In the following procedure, you configure the target, then replace the source connection with a parameter.
Because you plan to parametrize the source, you also need to use a parameter for the field mapping.
- To add a Target transformation, on the Transformation palette, drag a Target transformation to the mapping canvas.
- To link the Target transformation to the data flow, draw a link from the Filter transformation to the Target transformation.
- Click the Target tab and configure the following properties:
- Connection :- Target connection. Select a connection for the target. Or, create a new connection to the target. Target Type :- Target type. Select Object.
- Object :- Target object. Select an appropriate target.
- Operation :- Target operation. Select Insert.
- To configure the field mapping, click Field Mapping.
- To map some fields and allow the remaining fields to be mapped in the task, configure the Field Map Option for Partially Parametrized.
- Create a New Parameter and configure the following properties.
- Name: PartialFieldMapping.
- Display Label: Partial Field Mapping.
- Select Allow partial mapping override. This allows you to view and edit mapped fields in the task. When want to prevent the task developer from changing field mappings configured in the mapping, clear this option.
- Map the fields that you want to show as mapped in the task.
- Click Save > Save and Continue.
- To edit the source to add a parameter for the source connection, click the FF_Account Source transformation, and then click the Source tab.
- For Connection, click New Parameter.
- In the New Parameter dialog box, configure the following parameter properties.
Step 4. Mapping Validation and Task Creation
In the following procedure, you save and validate the mapping. And you create a mapping configuration task based on the mapping.
- To validate the mapping, click Save > Save and Continue.
- When you save the mapping, the Mapping Designer validates the mapping. The mapping is valid when the Status in the status area shows Valid.
- If the status is Invalid, in the toolbar, click the Validation icon. In the Validation panel, click Validate.
- The Validation panel lists the transformations in the mapping and the mapping status. The mapping should be valid. If errors display, correct the errors. Click Validate to verify that errors are corrected.
- To create a task based on the mapping, click Save > Save and New Mapping Configuration Task. The Mapping Configuration Task wizard launches as shown below.
- On the Definition page, enter a name for the task: Mapping Tutorial and give your Secure Agent. Notice, the task uses the mapping that you just completed.
- Click Next. On the Sources page, the source parameter displays. Notice, the tool tip for the connection displays the parameter description. For Sample Flat File, select the source connection to the sample file, and click Next.
- Notice, the Targets page does not display because the target connection and object is defined in the mapping.
- The Other Parameters page displays the remaining parameters for the mapping.
- In the Partial Field Mapping parameter, map the target fields that you want to use.
- Note that because you allowed partial mapping override, the Target Fields list displays all fields. You can keep or remove the existing links.
- For the Filter Value for State parameter, delete the default value, MD, and enter TX.
- To save and close the task, click Save > Save and Close.
In the next step you can schedule the mapping on a predefined schedule. Hope you guys enjoyed this article. We are curious to know about your feedback.