I have a simple parameter where I should pass the first day of current month. What should I write on property value?
how to set current month as default value on simple parameter on pentaho cde?
1.2k Views Asked by AudioBubble At
2
There are 2 best solutions below
1
On
As far as i know, the properties file cannot have a formula that will calculate on run time when you use the value.
What you can do instead, is in the beggining of your Job have a KTR that will set this variable for you.
You KTR should look something like this:
Set the parameter date_mois (exact same name) in your Root Job, and this variable will be passed down to subsequent KTR / JOB calls (This is default unless uncheked).


You can create a custom parameter, which allows you to set it to the return value of a Javascript function:
When you load the dashboard the parameter will be calculated and will have an integer value between 1 and 12.
If you want the parameter to have as value the date string for day 1 of this month you can instead use
This will return the date as a string in the format
yyyy-MM-ddfor day 1 of the current month.