Generate and Execute the Code for an Apply Activity Using SQL Developer

The Oracle Data Mining 10.2.0.3 Tutorial also contains examples of generating and executing code.

Note: Oracle Data Miner 10.2.0.4 and Oracle Data Miner 11.1 allow you to generated code using Oracle SQL Developer 1.0 or Oracle SQL Developer 1.2.

Follow these steps to generate and execute code for the apply activity DEMO_SVM_AA:

  1. Start Oracle SQL Developer and connect to the data mining server.
  2. Generate code for the apply activity DEMO_SVM_AA.
  3. Execute the generated code.

Start SQL Developer and Connect

Start SQL Developer. Connect to the data mining server as follows:

  1. Click the Connections tab.
  2. If necessary, define a connection to the database and account where you created the apply activity. To create a connection:
  3. Connect to the database: Expand Connections, select the connection, right-click, and select Connect.

Generate Code

Follow these steps to generate code:

  1. Select File | New.
  2. In the New Gallery, expand Database Tier and select Database Objects. If you do not see Database Objects, set Filter By to All Items.
  3. Select Data Mining PL/SQL Package and click OK. new gallery with generate code selected
  4. Use the wizard to generate the code. Select the activity DEMO_SVM_AA. Name the package DEMO_SVM_APPLY.

Execute the Generated Code

Follow these steps to execute the generated code:

  1. Expand Packages in the database connection where you created the activities.
  2. Before you execute the code, you must select an apply procedure and specify parameters for it. Select the apply procedure as follows:
  3. Set parameters by editing the BEGIN block in the PL/SQL Block pane as follows: parameter selections for example
  4. Click OK to execute the code with these parameters.
  5. The procedure executes. If there are any problems, messages describing the problems appear in the Running - Log tab. If there are no problems, the process exits and disconnects from the database connection.
  6. After execution completes, view the output table. Expand Tables and double-click DEMO_OUTPUT. parameter selections for example
    To see the data, click the Data tab.