Parameter on UniversalDataWriter stopped working

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.

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:

//#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

That did it! Thanks!