Tuesday, April 27, 2021

Talend: Read CLOB data from Oracle DB

Scenario: Using Talend, read the JSON data stored in Oracle table as CLOB column.

Components used for demonstration:

TOracleInputDelimited: used for reading Oracle data

TLogRow: used for displaying the data on the screen

Configuration:

In TOracleinputDelimited 'Edit Schema', set the Type to 'Dynamic' and DBtype to 'NVARCHAR2' for the incoming CLOB column.




This will convert the incoming CLOB data to string format which later can be used in downstream components like TExtractJsonField.


Sunday, April 25, 2021

Split Data into Multiple output CSV Files in Talend

 Scenario: Split the incoming 5 million data into multiple files of 1 million records in each

Components used for demonstration:

TRowGenerator: used for creating sample records

TFileOutputDelimited: used for writing a CSV file

Flow:







Configuration:

TRowGenerator:

Add the sample columns and set the "Number of rows for RowGenerator" to 5 million records





TFileOutputDelimited: Basic Settings

TFileOutputDelimited: Advanced Settings

"Rows in each output file" - mention the number of records that should be in each output file. In our case, it is 1 million records




Generated Output Files:







Monday, April 19, 2021

String to Integer conversion in Talend TMAP

 Method1:

Integer.parseInt(row1.Col_String)

Integer to String conversion in Talend TMAP

 Method1:

String.valueOf(Col_Number)

Method2:

"" + Col_Number