- 1 year ago
How can I pass parameters from Windows command prompt to Kitchen.bat (Pentaho)?
To pass parameters from the Windows command prompt to Kitchen.bat
(Pentaho Data Integration), you can use command-line arguments. Here's how you can do it:
Open the Windows command prompt.
Navigate to the directory where
Kitchen.bat
is located.Use the following syntax to pass parameters:
bashKitchen.bat /param:parameterName=parameterValue /param:parameterName2=parameterValue2 ...
Replace
parameterName
with the name of the parameter you want to pass andparameterValue
with the corresponding value.For example, if you have a transformation named
myTransformation.ktr
and you want to pass a parameter namedinputFile
with the valuedata.csv
, you would use the following command:bashKitchen.bat /file:"myTransformation.ktr" /param:inputFile=data.csv
You can pass multiple parameters by adding more
/param
options to the command.Press Enter to execute the command and run
Kitchen.bat
with the specified parameters.
Inside your transformation or job, you can access these parameters using the ${parameterName}
syntax. For example, to access the inputFile
parameter, you can use ${inputFile}
in your transformation or job.
Make sure you have the correct paths and parameter names/values in your command. Adjust them according to your specific setup and requirements.