Parameter on UniversalDataWriter stopped working

Support/help with CloverETL implementation problems

bkrawczyk
Posts: 2
Joined: Mon May 08, 2017 2:27 pm

Parameter on UniversalDataWriter stopped working

Postby bkrawczyk » Mon May 08, 2017 2:36 pm

I have implemented the solution found at http://forum.cloveretl.com/viewtopic.php?f=4&t=6745&p=10719&hilit=UniversalDataWriter+Parameter#p10719 and it was working great. Today I tried to run my process and the output file name expected was DataFile_20170508.txt but instead looked like this: DataFile_`date2str(today(),"yyyy-MM-dd")`.txt.

Any idea what could have caused the parameter to stop working correctly?

I'm running CloverETL Designer Community v.4.5.1.003

Thanks.

jandikovae
Posts: 28
Joined: Fri Nov 04, 2016 8:51 am

Re: Parameter on UniversalDataWriter stopped working

Postby jandikovae » Wed May 10, 2017 8:04 am

Hi,

Thank you for your question. The reason why this solution doesn‘t work anymore is that since version 4.5.0 CloverETL doesn't support old CTL1 code anymore.

In CTL2 you can actually achieve the same thing using a dynamic parameter. In order to do that, please edit your parameter TODAY and instead of adding fixed value `date2str(today(),"yyyy-MM-dd")`, click on the button at the end of the line which brings you to the "Edit parameter value" screen. On that screen, click on the "Convert to dynamic" button and update the code to look as follows:

Code: Select all

//#CTL2

function string getValue() {
    return date2str(today(),"yyyy-MM-dd");
}


As your UniversalDataWriter's URL is already setup to use the parameter (${DATAOUT_DIR}/output-${TODAY}.txt), your graph should now run as you expect, without any issues.

Thanks.

Eva
---
Eva Jandikova
CloverCARE Support
CloverETL | Rapid Data Integration

Visit us online at http://www.cloveretl.com
How to speed up communication with CloverCARE support

bkrawczyk
Posts: 2
Joined: Mon May 08, 2017 2:27 pm

Re: Parameter on UniversalDataWriter stopped working

Postby bkrawczyk » Wed May 10, 2017 12:06 pm

That did it! Thanks!


cron