Generating a Mapping or Logical Data Object from an SQL Query
Generating a Mapping or Logical Data Object from an SQL Query
You can convert an SQL statement into a mapping or a logical data object. You might want to generate a logical data object to create an object that you can reuse in other mappings.
Click
File
New
Mapping from SQL Query
.
The
Generate Mapping or Logical Data Object from SQL Query
dialog box opens.
Choose whether to enter an SQL query, or select a file that contains an SQL query.
To enter an editable SQL query, choose
Enter an SQL Query
, and then type or paste an SQL query in the editor. Then click
Validate Query
.
To select a file that contains an SQL query, choose
Select an SQL file
, and then browse to the file that contains an SQL query.
The Developer tool validates the SQL syntax. If the syntax is not valid, you must fix it before you can proceed.
To generate a logical data object instead of a mapping, select
Generate Mapping as a Logical Data Object
.
Optionally, rename the mapping or logical data object that you want to generate.
Click
Next
.
The dialog box displays the tables that correspond to data sources.
Click the row of the table under
Data Source
to select the data source for the mapping.
If the table has a data source, you can click it to optionally change the data source.
The
Select Data Source
dialog box opens and lists the tables on the Model repository that you can access.
Select any data source in the Model repository.
Click
Finish
.
The generated mapping or logical data object opens in an editor.
You can select any object in the mapping to view or edit it. Then you can run the mapping or include it in an application or workflow that you deploy to the Data Integration Service.
If you created a logical data object, you can reuse it in other mappings. For example, you can reuse the generated logical data object as the source in a mapping.