How can I pass parameters from Windows command prompt to Kitchen.bat (Pentaho)?

  • 1 year ago
Comment

ChatGPTChatGPT
1 / 1

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:

  1. Open the Windows command prompt.

  2. Navigate to the directory where Kitchen.bat is located.

  3. Use the following syntax to pass parameters:

    bash
    Kitchen.bat /param:parameterName=parameterValue /param:parameterName2=parameterValue2 ...

    Replace parameterName with the name of the parameter you want to pass and parameterValue with the corresponding value.

    For example, if you have a transformation named myTransformation.ktr and you want to pass a parameter named inputFile with the value data.csv, you would use the following command:

    bash
    Kitchen.bat /file:"myTransformation.ktr" /param:inputFile=data.csv

    You can pass multiple parameters by adding more /param options to the command.

  4. 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.