Replicating the input data flow - Cloud - 7.3

Talend Job Script Reference Guide

Version
Cloud
7.3
Language
English
Product
Talend Big Data
Talend Big Data Platform
Talend Cloud
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
Module
Talend CommandLine
Talend Studio
Content
Design and Development > Designing Jobs
Last publication date
2023-09-13

Procedure

  1. Next to the tFileInputDelimited component definition, enter the following functions to add and label the tReplicate component.
    // replicate input data
    addComponent {
    	setComponentDefinition {
    		TYPE: "tReplicate",
    		NAME: "tReplicate_1",
    		POSITION: 288, 192
    	}
    	setSettings { 
    		LABEL : "replicate_flows"
    	}
    }
  2. Next to the setSettings {} function, enter an addSchema {} function and its addColumn {} sub-function to define the data structure of the output flows.

    As this component only passes on the schema of the input flow to the output flows, just copy the column definitions from the tFileInputDelimited component definition.

    addSchema {
    		NAME: "tReplicate_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"
    		}
    		addColumn {
    			NAME: "marriageStatus",
    			TYPE: "id_String"
    		}
    	}