Generate a Mapping from an SQL Statement
To generate a mapping from an SQL statement, perform the following tasks:
- 1. Create an SQL statement.
- 2. Paste or import the SQL statement to the Developer tool, validate the SQL statement, and generate a mapping.
- 3. Complete mapping development. Follow these steps:
- a. Test and iteratively develop the mapping until it meets requirements.
- b. Deploy the mapping to the Data Integration Service.
Create an SQL Statement
To use an SQL statement to generate a mapping, create an SQL statement.
You can use an SQL query tool or write an SQL statement from scratch to create an SQL statement. Follow the syntax guidelines in this article.
Note: Some non-Informatica functions are supported. Others can be used in a valid query that generates a mapping with results that are not valid. For more information about function support in SQL statements, contact Informatica Global Customer Support.
Paste or Import the SQL Statement to the Developer Tool
1. Locate the SQL file that contains the SQL statement to import, or copy the entire statement to the clipboard.
2. In the Developer tool, click File > New > Mapping from SQL Query
The Generate Mapping or Logical Data Object from SQL Query dialog box opens.
3. Import the query to the dialog box. Choose one of these methods:
- - Select Enter an SQL Query and paste the query from the clipboard to the editor.
- - Select Select an SQL File and browse to and select the file.
4. Click Validate.
Developer tool validates the SQL statement. Correct any errors.
5. If you want to generate a logical data object instead of a mapping, select Generate Logical Data Object from the SQL Query.
If you select this option, perform the following steps:
- a. Optionally rename the logical data object to create.
- b. Optionally click Browse to select a location for the Logical Data Object, or accept the default location.
- c. Click Validate.
Developer tool validates the SQL statement. Correct any errors.
6. Click Next.
The Select the data source for the table dialog box opens.
7. To select a data source for the table, click in the Data Source column, and then click Browse.
The following image shows where to click Browse to select a data source:
8. Click Finish.
The Developer tool generates a mapping from the SQL query and opens the mapping in an editor.
Complete Mapping Development
After you create a mapping, perform the following steps to complete development of the mapping:
- 1. Run the mapping and view results.
- 2. Iteratively edit and re-run the mapping until it meets requirements.
- 3. Deploy and run the mapping on the Data Integration Service.
You can deploy the mapping by itself, or include it in an application that you deploy. If you deploy the mapping by itself, the Data Integration Service creates an application to contain it.
For more information about mappings, applications and deployment, see the Informatica Developer Tool Guide.