The content of this article is familiar with the application of JS scripts in kettle data processing. It has a certain reference value. Now I share it with everyone. Friends in need can refer to it
Solution: Combine Generate Rows (data generation) and Java Script Value (JS component) and text input component to complete this function
1): Drag a data generation component and fill in the data
2): Drag a Java Script Value (JS component), add the following JS code and get the variable
3): Drag a text file to output and select the directory to be output
4): Complete the process instructions. This step needs to be done in step2 and step3. Press and hold the SHIFT key to connect each component
5) : Click the run button to verify
It is not difficult to find through observation:
1) orgDate has been converted from yyyy-MM-dd format to yyyy/MM/ dd
2) timestamp_val already has a js function to generate a timestamp
##Related recommendations:
Kettle case five uses js script for json data processing and adds new lines
kettle case four uses java script for data processing
The above is the detailed content of Familiar with the application of JS scripts in kettle data processing. For more information, please follow other related articles on the PHP Chinese website!