Generate and Execute the Code for an Apply Activity Using JDeveloper

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

This example generates and executes a PL/SQL package. These packages are callable from Java programs.

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

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

Start JDeveloper and Connect

Start JDeveloper. 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 database connection:
  3. Connect to the database: Expand Connections, expand Database, 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_JDEV.

Execute the Generated Code

Follow these steps to execute the generated code:

  1. In the database connection, expand the user schema where you generated the activities.
  2. Expand Packages.
  3. Before you execute the code, you must select an apply procedure and specify parameters for it. Select the apply procedure as follows:
  4. Set parameters by editing the BEGIN block in the PL/SQL Block pane as follows: parameter selections for example
  5. Click OK to execute the selected procedure with these parameters.
  6. 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.
  7. After execution completes, view the output table. Expand Tables and double-click DEMO_OUTPUT_J. The structure of the table is displayed. parameter selections for example
    To see the data, click the Data tab.