Displaying the aggregation and sorting result - 6.5

Talendジョブスクリプトリファレンス

author
Talend Documentation Team
EnrichVersion
6.5
EnrichProdName
Talend Big Data
Talend Big Data Platform
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Real-Time Big Data Platform
task
ジョブデザインと開発 > ジョブデザイン
EnrichPlatform
Talend CommandLine
Talend Studio

Use the procedure below to add and configure a tLogRow component to display the score aggregation and sorting result.

Procedure

  1. Next to the tSortRow component, add a new component, tLogRow.
    addComponent {
    	setComponentDefinition {
    		TYPE: "tLogRow",
    		NAME: "tLogRow_1",
    		POSITION: 800, 192
    	}
    
    }
  2. Next to the setComponentDefinition {} of tLogRow, define the component properties using the setSettings {} function.

    In this example, label the tLogRow component result and configure it to display the output data in a table.

    	setSettings {
    		BASIC_MODE : "false",
    		TABLE_PRINT : "true",
    		LABEL : "result"		
    	}
  3. Next to the setSettings {}, enter the addSchema {} function to define the structure of the output data.

    In this example, the tLogRow component must have the same schema structure of the tSortRow component.

    	addSchema {
    		NAME: "tLogRow_1",
    		CONNECTOR: "FLOW"
    		addColumn {
    			NAME: "subject",
    			TYPE: "id_String"
    		}
    		addColumn {
    			NAME: "sum",
    			TYPE: "id_Double",
    			PRECISION: 2
    		}
    		addColumn {
    			NAME: "average",
    			TYPE: "id_Double",
    			PRECISION: 2
    		}
    		addColumn {
    			NAME: "max",
    			TYPE: "id_Double",
    			PRECISION: 2
    		}
    		addColumn {
    			NAME: "min",
    			TYPE: "id_Double",
    			PRECISION: 2
    		}
    	}