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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Exporting environmental variables through shell script for talend job

I am using the below shell script to run a job in Talend.

export DATE=`date +%Y%m%d`
./job1.sh

but i receive the below error:

Processing Date : null
Exception in component tMysqlInput_2 (job1)
java.lang.NumberFormatException: null
at java.lang.Integer.parseInt(Integer.java:542)
at java.lang.Integer.parseInt(Integer.java:615)

Labels (3)
4 Replies
TRF
Champion II
Champion II

Can you share tMysqlInput_2 configuration or other component configuration which interact with the environment variable?
Anonymous
Not applicable
Author

Hi this issue occurs only while running it on a linux sever but in talend
studio error does not occur.
Anonymous
Not applicable
Author

This job works in talend studio, in windows as a batch script but not in linux.

I changed my variable and now I am able to see the date but still face an error:

script:

export DATE=`date +%Y%m%d`
./job1.sh

output:

Processing Date : 20170828
Exception in component tMysqlInput_2 (job1)
"ava.lang.NumberFormatException: For input string: "20170828
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:580)
at java.lang.Integer.parseInt(Integer.java:615)

Anonymous
Not applicable
Author

The input reads data WHERE Date="+Integer.parseInt(System.getenv(DATE))