Generating a SQL script for your mining flow

You can generate a SQL script for your mining flow that contains all SQL statements necessary to run your mining flow.
The resulting SQL script invokes SQL transformations and Intelligent Miner® Easy Mining Stored procedures. These SQL statements can be embedded into any application that can issue SQL against a Db2® database, such as:
  • C programs that issue CLI or ODBC calls
  • Java™ programs that use JDBC
  • Visual Basic programs that use ADO
  • Any other of the many language bindings available for the Db2 database

You can also run the script from the Db2 command window, Db2 task center or your tool of choice that you use to execute SQL steps in batch mode.

Before you begin

Create, validate, and execute your mining flow.

Procedure

To generate a SQL script, follow these steps:

  1. Open the mining flow.
  2. Select the mining editor window.
  3. Select Mining Flow > Generate SQL code (or click the Generate the SQL/DDL script for this mining flow icon The Generate the SQL/DDL script for this mining flow icon on the toolbar).
A SQL script is generated in the mining-flows folder of your Data Warehousing project and displayed with the SQL Source Editor.
Notes:
  • When you edit the SQL script, it is recommended to rename it to avoid losing your work when you regenerate from the mining editor.
  • You can open the SQL script after you close it. Use the Navigator view to locate the script in the mining-flows folder. It has the same name as the mining flow and an extension of DDL.


Feedback