Scenario 2: Rejecting inflow data when the elements to be written do not exist in a given cube - 6.3

Talend Open Studio for Big Data Components Reference Guide

EnrichVersion
6.3
EnrichProdName
Talend Open Studio for Big Data
task
Data Governance
Data Quality and Preparation
Design and Development
EnrichPlatform
Talend Studio

The Job in this scenario tries to write data into the Sales cube but as the elements of interest do not exist in this cube, the inflow data is rejected.

To replicate this scenario, proceed as follows:

Setting up the Job

  1. Drop tFixedFlowInput, tPaloCheckElements, tPaloOutputMulti and tLogRow from the component Palette onto the design workspace.

  2. Right-click tFixedFlowInput to open its contextual menu.

  3. In this menu, select Row > Main to connect this component to tPaloCheckElements.

  4. Do the same to connect tPaloOutputMulti using row link.

  5. Right-click tPaloCheckElements to open its contextual menu.

  6. In this menu, select Row > Reject to connect this component to tLogRow.

Configuring the input component

  1. Double-click the tFixedFlowInput component to open its Component view.

  2. Click the three-dot button to open the schema editor.

  3. In the schema editor, click the plus button to add 7 rows and rename them respectively as Products, Regions, Months, Years, Datatypes, Measures and Values. The order of these rows must be consistent with that of the corresponding dimensions in the Sales cube and the type of the Value column where the measure value resides is set to double/Double.

  4. Click OK to validate the editing and accept the propagation prompted by the dialog box that pops up. Then the schema column labels display automatically in the Value table under the Use single table check box, in the Mode area.

  5. In the Value table, type in values for each row in the Value column. In this example, these values are: Smart Products, Germany, Jan, 2009, Actual, Turnover, 1234.56. The Smart Products element does not exist in the Sales cube.

Configuring the tPaloCheckElements component

  1. Double-click tPaloCheckElements to open its Component view.

  2. In the Host name field, type in localhost.

  3. In the Server Port field, type in the listening port number of the Palo server. In this scenario, it is 7777.

  4. In the Username field and the Password field, type in the authentication information. In this example, both of them are admin.

  5. In the Database field, type in the database name in which you want to create the cube, Demo in this example.

  6. In the Cube field, type in the name of the cube you want to write data in, for example, Sales.

  7. In the On Element error field, select Reject row from the drop-down list.

  8. In the element table at the bottom of the Basic settings view, click the Element type column in the Value row and select Measure from the drop down list.

Configuring the output component

  1. Double-click tPaloOutputMulti to open its Component view.

  2. In the Server Port field, type in the listening port number of the Palo server. In this scenario, it is 7777.

  3. In the Username field and the Password field, type in the authentication information. In this example, both of them are admin.

  4. In the Database field, type in the database name in which you want to create the cube, Demo in this example.

  5. In the Cube field, type in the name of the cube you want to write data in, for example, Sales.

  6. In the Cube type field, select the Normal type from the drop-down list for the cube to be created, meaning this cube will be normal and default.

  7. In the Measure Value field, select the Measure element. In this scenario, select Value.

Job execution

Press F6 to run the Job.

The data to be written is rejected and displayed in the console of the Run view. You can read that the error message is Smart Products.