Transform incoming data from toracleinput and output into file

Four Stars

Transform incoming data from toracleinput and output into file

Hi ,

i want to edit the data coming from toracleinput like substring in tmap/ tjavarow and output to file.

toracleinput -> tmap -> tfileoutputdelimeted

i am currently getting null pointer exception.

But this works if i do it in another subjob storing the values first in a file and then transforming the data like below:

toracleinput -> tfile

tfileinput -> tmap -> tfileoutput

 

But i want to directly do it in single step as its consuming time.

 

Thanks in Adv,

Hachi

Ten Stars

Re: Transform incoming data from toracleinput and output into file

In tmap you could write this code :

row1.name == null ? null : row1.name.substring(1,3)

The nullpointer exception is raised because the function cant handle null values, if you would put an empty string like "" its possible and thats the reason why first storing it into a file works... 
Make sure your output table can handle null values... because an empty string "" isnt the same as "null" 

 

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog