Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Can someone advise me below? Thank you so much!
I am trying to use tSendmail component to send file with current date. I put below in tsendmail file attachment -
"C:/Users/....../E106_Error_report_"+TalendDate.formatDate("yyyyMMddHHmmss",TalendDate.getCurrentDate())+".US.DWLOGN"
and I got below error -
Regarding the job design, it should looks like this to be clearer:
Now, why it doesn't work, this is the question.
In your 1rst post you said you use TalendDate.formatDate("yyyyMMddHHmmss",TalendDate.getCurrentDate()) to construct the filename in tSendMail.
As "ss" changes every second (!!!) you probably have a different filename between tFileOutputDelimited and tSendMail.
To avoid this kind of mistake, I suggest you to use a global or context variable to define the filename and filepath.
Hi,
Please see below. I successfully run the report but not good through tsendmail component
The E106_US is the file you are attempting to send via email correct? IF so. Connect the tsendmail to the E106_US file Use a OnSub or ONComp to connect.
Regarding the job design, it should looks like this to be clearer:
Now, why it doesn't work, this is the question.
In your 1rst post you said you use TalendDate.formatDate("yyyyMMddHHmmss",TalendDate.getCurrentDate()) to construct the filename in tSendMail.
As "ss" changes every second (!!!) you probably have a different filename between tFileOutputDelimited and tSendMail.
To avoid this kind of mistake, I suggest you to use a global or context variable to define the filename and filepath.
Thanks! Your advice is very helpful! - after I delete "ss" and tsendmail worked.
I am also learning on creating global variable/context variable. Can you please educate me what global variable means? can't find explanation and not know how to do