12.3 Use ML Model in a Data Flow
You can use the Prediction Model database function to run ML Model algorithms on source data and load the output to a target database.
Before you use an ML Model in a data flow, you need build the ML Model. For instructions on how to create an ML model, see Create an ML Model Data Entity in the Data Flow editor.
To use an ML Model in a data flow:
- Follow the instructions in Create a Data Flow to create a new data flow.
- In the Data Flow Editor, drag the tables that you want to use as a source in the data flow and drop them on the design canvas.
- From the Database Functions toolbar, click Machine Learning and drag the Prediction Model transformation component drop it on the design canvas.
- Click the Prediction Model transformation component to view its properties.
- In the General tab, specify the following:
- Connection - The drop-down lists all the available Oracle connections. Select the Oracle connection that you want to use.
- Schema - Select the schema.
- ML Model - The drop-down lists all the available ML models. See Create an ML Model Data Entity in the Data Flow editor for instructions on how to build an ML Model.
- In the Column Mapping tab, map the source column that you want
to embed to the INPUT attribute of the operator. The only column available in the
column mappings is
prediction parameters
. Drag a text column from the available columns to the Expression column. - Drag the table that you want to use as a target in the data flow and drop it on the design canvas.
- Save and execute the data flow.
Data Transforms will run the prediction model on the source data and write the output to the target table.
Parent topic: Machine Learning (ML) Models