Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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)
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)
The input reads data WHERE Date="+Integer.parseInt(System.getenv(DATE))