Defining the column filter component - 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

Procedure

  1. Next to the tReplicate component definition, enter the addComponent {} function and its setComponentDefinition {} and setSettings {} functions and parameters to add and label the tFilterColumns component.
    // filter data columns - remove 'marriageStatus'
    addComponent {
    	setComponentDefinition {
    		TYPE: "tFilterColumns",
    		NAME: "tFilterColumns_1",
    		POSITION: 512, 224
    	}
    	setSettings {
    		LABEL : "filter_columns"
    }
  2. Next to the setSettings {} function, enter an addSchema {} function and its addColumn {} sub-functions to define the schema for the output flow.

    In this example, just copy the column settings defined in the previous component, with the marriageStatus column removed.

    	addSchema {
    		NAME: "tFilterColumns_1",
    		CONNECTOR: "FLOW"
    		addColumn {
    			NAME: "name",
    			TYPE: "id_String"
    		}
    		addColumn {
    			NAME: "gender",
    			TYPE: "id_String"
    		}
    		addColumn {
    			NAME: "age",
    			TYPE: "id_Integer",
    			LENGTH: 2
    		}
    		addColumn {
    			NAME: "city",
    			TYPE: "id_String"
    		}
    	}