Defining the column filter component - 6.5

Talend Job Script Reference Guide

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
Talend CommandLine
Talend Studio
Design and Development > Designing Jobs


  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",
    		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"