Script
The script processor is used to process data. You can use a specified programming language to compile a script, process the data transferred to the script processor, and generate new data for subsequent steps.
Configuration Parameters
Parameter |
Description |
---|---|
Script Language |
Programming language used for writing scripts. Currently, only JavaScript of the ES6 version is supported. For details, see the official document of the ES6. |
Script Content |
Compile the script content. You can reference data from previous nodes. For details, see Referencing Variables. Format: // This method is the script execution entry. // The input data includes payloads and properties, representing the output data of each node. // Example: data.payloads['357123'], data.properties['357123'].id, where 357123 indicates the node ID. function execute(data) { return data; } You can access object attributes directly using data.payloads or data.properties['357123'], such as with JSON data. There is no need to use JSON.parse(). The JSON object is already parsed and ready to use. If you need to write a function or logic code block, use braces ({}) to surround the code block. |
Constraints
New features:
- node:crypto
- WebCrypto(crypto.subtle)
- Elasticsearch 2023 type
- Operators
- Private objects
- Object
- String
- Numbers
- Built-in objects
- For details, see the Elasticsearch 2023 development guide.
Unsupported features:
- Network access
- Environment variables
- Process access
- File system access
- Dynamic code evaluation
- Restricted features
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot