Use the Build Model job entry for SDR
The Build Model job entry can be used to create Data Source Wizard data sources, which includes both a Metadata and a Mondrian model. It works by searching upstream for an output step or data service upon which to base your model, or you can select an existing Data Source Wizard or Analyzer model from the Pentaho Server. Note that if you are using a data service as the source in your Build Model job entry, you must be connected to a Pentaho Repository to successfully publish your model.p
After you have run this job entry, a data model is created and can be published to the server for the creation of Analyzer reports in the Pentaho User Console. Business users will also be able to refine the data model with the Data Source Model Editor. If you selected an Analyzer model to build from, the Build Model job entry will only create an Analyzer model.
A Build Model job entry builds the model and sets variables into the job that can be modified or picked up by the Publish Model job entry. An example workflow is shown below.
After the Build Model job runs successfully, you can publish the data source to the Pentaho Server.
Create a Build Model job entry
Before you begin
In the Design tab, click the Modeling folder, and then double-click the Build Model job entry. Alternatively, you can drag the job entry icon on to the job canvas.
Double-click the Build Model icon to open the Build Model dialog box.
Enter a name for the entry in the Entry name field.NoteThe following characters are not valid in Data Source Wizard source names:
% ? :  * \t \r \n
In the Source field, select an output step or a Pentaho Data Service from the drop-down menu, or press CTRLSpace to select a variable.The selected output step or data service provides the source data in the model. If no data is written to the table by the selected source, then the Build Model job entry will not build a model.NoteWhen you select a Pentaho Data Service as the source, previously defined link dimensions will not be linked to your model. Link dimension annotations are dependent on shared dimensions, and shared dimensions cannot use a data service for their source. See Pentaho Data Services for more information about data services.
Enter a name for your data model in the Model Name field. Optionally, click in the field and press CTRLSpace to select a variable.The model name entered here will appear in the list of data sources in the Pentaho Server.
In the Modeling Method section, you can select the modeling method for the entry.
NoteWhen you select Auto Model and you have modified a measure in Analyzer, the inline model editing changes you made in Analyzer will take priority over any annotations added to the measure in PDI. In addition, annotations you add in PDI will not be visible for that measure when viewed in Analyzer.
- Auto Model if you want to build a new model. When you choose to auto model, your annotations will be applied to the model when it is opened in Analyzer.
- Use Existing if you want to base your model on one which already exists in the Pentaho Server. Click the Select button below to enter the name of an existing model from the server in the required field. See Select existing model options. When you use an existing model, your annotations will not be applied to the model when it is opened in Analyzer.
Click OK to save your changes and close the dialog box, or click Cancel to discard your changes and close the dialog box.
Select existing model options
Fill in or edit the fields in the Pentaho Server Connection section.
Field Description URL The base URL string used to connect to the server. User Name The user name required to access the server. Password The password associated with the provided user name which is passed during the authentication process.
Click the Connect button to connect to the server using the information provided in the above fields.If the connection was successful, the Existing Models drop-down menu will be available for selection with a list of models to choose from.
Select a model from the Existing Models drop-down menu.If no models are listed, verify that you are connected to the Pentaho Server.
(Optional) Select the Create model if not found check box to generate a model if the system cannot find an existing model with the entered name.
When finished, click OK to save your changes and close the dialog box, or Cancel to close the dialog box without saving your changes.
Variables for Build Model job entry
These variables are generated when the the model is created. You can only see these specific variables for the Build Model job entry if you press CTRLSpace after the first run.
You can use these variables to know more about the model you created. For example, if you have scheduled a job to run at regular intervals, you can include these variables in the Mail job entry to alert you to any issues during the run.
|JobEntryBuildModel.DatabaseConnection.<Model Name>||String||Returns the name of the database connection used by the transformation on the source. This connection information is specified in the Build Model job entry.|
|JobEntryBuildModel.XMI.<Model Name>||String||Returns all the contents of the XML file published on the Pentaho Server (It may or may not contain the OLAP components.)|
|JobEntryBuildModel.XMI.DSW.<Model Name>||Boolean (True or False)||Indicates if the XMI should be delivered as a Data Source Wizard data source. Typically, when this is 'true', we only generate the DSW data source and no other contents.|