Script Node
Script node runs custom Python logic when built-in nodes are insufficient.
Configuration Fields
| Field | Required | Purpose |
|---|---|---|
| Python Code | Yes | Custom script logic (expected entry function) |
Example
def main(data):
if "temperature_f" in data:
data["temperature_c"] = (data["temperature_f"] - 32) * 5.0 / 9.0
return data
Best Practices
- Keep scripts focused and testable.
- Validate input keys before access.
- Return stable output shapes.
- Avoid external side effects unless explicitly required.
Common Issues
- Runtime exceptions from missing keys/types.
- Inconsistent output shape breaking downstream nodes.
