Using Oracle JDeveloper to Generate Code

Before you can use Oracle JDeveloper to generate code, you must install the Oracle Data Miner PL/SQL Code Generator Extension for JDeveloper. You install the Code Generator Extension using the Help | Check for Updates selection in Oracle JDeveloper.

The code generator is available under Database Objects in the New Gallery in the Database Tier.

You can run programs that use generated code in Oracle JDeveloper. If you plan to use JDeveloper to debug such programs, you need the following grants:

Follow these steps to generate code:

  1. Select a schema folder or an object in a JDBC database connection as appropriate. If you do not select one of these items, the code generator extension will be grayed out.
  2. Select File | New; the New Gallery opens.
  3. In the New Gallery, select All Items from the Filter By list.
  4. You can access the Code Generator extension in the Database Tier in Database Objects . Select Data Mining PL/SQL Package and click OK.
  5. The Data Mining PL/SQL Package Wizard is launched. Use the wizard to generate the package.

For an example of how to generate code and execute it, see Code Generation Example.