Generating scripts that you can deploy

You can generate a query that represents the interpretation of all mappings in a mapping model.
Before you can generate a script, you must create and save a mapping model.
You can use the Generate Script wizard to generate an SQL or SQL/XML script. The generated script is a rendering of the content of a mapping model. If the script is in SQL, you can create a select statement, an insert statement, or a view statement. If the script is in SQL/XML, then you can create only a select statement. You also can generate views and nickname objects, and you can deploy the script on a database model or on the physical database to transform data from the original source to a new target schema.

You can generate many possible scripts. For example, you can create a view from a mapping in a mapping model. If you want to create a view, a view object will be added to the .dbm file in the Data Project Explorer view, so that you can deploy the object to the server. In addition, if a mapping model uses remote tables as the mapping source, you can deploy the script to a federated target. The script is generated with the federated server information for the nicknames for the remote tables. The new nickname objects will be added to the .dbm file in the Data Project Explorer view so that the nickname objects can also be deployed.

SQL and SQL/XML is generated to the SQL 2003 standard. For the Information Integrator platform, DDL statements for DB2 nickname creation are generated. The generated SQL/XML queries from the mapping editor will run on all platforms and databases that conform to the SQL 2003 standard. Because conformance to standard varies from vendor to vendor and the generated queries use system functions, only DB2 has been tested extensively. Some queries may not run on Oracle or other platforms. For recursive XML schema targets, the SQL/XML query generation only considers the first two levels of recursion. No valid query is generated for a deeper level of recursion.

To generate a script:

  1. In the Mappings folder, right-click the mapping model and select Generate Script. The Generate Script wizard opens. You also can launch the Generate Script wizard by clicking the SQL push button on the toolbar.
  2. Complete the wizard pages, and click Finish to generate and deploy the script.
Related reference
Mapping specification language file

Feedback