|
|
--- |
|
|
sidebar_position: 3 |
|
|
--- |
|
|
|
|
|
|
|
|
|
|
|
The **YAML** tab combines all data from other tabs (Design, Script, Environment, Catalog) into a unified view that defines everything about your node - from technical metadata to its position in the pipeline workspace. |
|
|
|
|
|
 |
|
|
|
|
|
|
|
|
|
|
|
The YAML tab serves as the "source code" of your node. It combines: |
|
|
|
|
|
- Input and output definitions from the Design tab |
|
|
- JavaScript code from the Script tab |
|
|
- Technical metadata from the Catalog tab |
|
|
- Environment variables from the Environment tab |
|
|
- Node positioning and connections within the pipeline |
|
|
|
|
|
This complete representation allows you to precisely duplicate nodes by copying their YAML configuration to other pipelines. |
|
|
|
|
|
|
|
|
|
|
|
The YAML configuration is organized into logical sections: |
|
|
|
|
|
|
|
|
```yaml |
|
|
_id: merge_text_to_json |
|
|
version: 1 |
|
|
category: |
|
|
_id: processing |
|
|
title: en=Processing;ru=Обработка |
|
|
package: custom |
|
|
title: en=Merge text to JSON;ru=Объединение текста в JSON |
|
|
source: node |
|
|
execution: regular |
|
|
``` |
|
|
|
|
|
These fields define the node's identifier, version, category classification, and package binding. |
|
|
|
|
|
|
|
|
```yaml |
|
|
script: |- |
|
|
export async function run({ inputs }) { |
|
|
const { NextNode } = DEFINITIONS; |
|
|
|
|
|
const jsonArray = []; |
|
|
|
|
|
if (inputs.string1) { |
|
|
jsonArray.push(inputs.string1); |
|
|
} |
|
|
if (inputs.string2) { |
|
|
jsonArray.push(inputs.string2); |
|
|
} |
|
|
if (inputs.string3) { |
|
|
jsonArray.push(inputs.string3); |
|
|
} |
|
|
if (inputs.string4) { |
|
|
jsonArray.push(inputs.string4); |
|
|
} |
|
|
|
|
|
return NextNode.from({ |
|
|
outputs: { |
|
|
json_output: jsonArray |
|
|
} |
|
|
}); |
|
|
} |
|
|
``` |
|
|
|
|
|
Contains the complete custom JavaScript code that we wrote in the Script tab. |
|
|
|
|
|
|
|
|
```yaml |
|
|
arrange: |
|
|
x: 170 |
|
|
y: 290 |
|
|
``` |
|
|
|
|
|
Defines the exact position of the node in the pipeline workspace. |
|
|
|
|
|
|
|
|
```yaml |
|
|
inputs: |
|
|
string1: |
|
|
title: en=String 1;ru=Строка 1 |
|
|
type: string |
|
|
required: false |
|
|
string2: |
|
|
title: en=String 2;ru=Строка 2 |
|
|
type: string |
|
|
required: false |
|
|
string3: |
|
|
title: en=String 3;ru=Строка 3 |
|
|
type: string |
|
|
required: false |
|
|
string4: |
|
|
title: en=String 4;ru=Строка 4 |
|
|
type: string |
|
|
required: false |
|
|
|
|
|
outputs: |
|
|
json_output: |
|
|
title: en=JSON;ru=JSON |
|
|
type: json |
|
|
``` |
|
|
|
|
|
Complete specifications for all 4 input parameters and 1 output parameter that we configured in the Design tab. |
|
|
|
|
|
|
|
|
```yaml |
|
|
catalog: |
|
|
_id: merge_text_to_json |
|
|
version: 1 |
|
|
category: |
|
|
_id: service_nodes |
|
|
title: Service Nodes |
|
|
package: service_nodes |
|
|
``` |
|
|
|
|
|
Metadata for publishing and organizing your custom node in the catalog. |
|
|
|
|
|
|
|
|
```yaml |
|
|
environment: |
|
|
OPEN_PAAS_USER: |
|
|
title: PaaS user |
|
|
type: string |
|
|
scope: global |
|
|
``` |
|
|
|
|
|
All environment variables and API keys required to connect the node to external providers. |
|
|
|
|
|
|
|
|
|
|
|
The most powerful feature of the YAML tab is the ability to create exact duplicates of nodes: |
|
|
|
|
|
1. **Copy YAML** - Select all code in the YAML tab and copy it |
|
|
2. **Create New Node** - Add a new node to any pipeline |
|
|
3. **Paste Configuration** - Replace the new node's YAML with the copied code |
|
|
4. **Save Changes** - The node will be recreated with identical functionality |
|
|
|
|
|
This process preserves all settings, code, and configuration, making it simple to reuse any nodes across different pipelines. |
|
|
|
|
|
|
|
|
|
|
|
The YAML tab is primarily intended for viewing and copying. While you can see the complete node configuration here, changes should be made through the appropriate tabs (Script for code changes, Design for input/output modifications, etc.) to ensure proper validation and formatting. |