Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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

Labels (3)
1 Reply
Jesperrekuh
Specialist
Specialist

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"