Block components execute operations.
let | code | console | |
---|---|---|---|
Assigns variable in the ETL process context.
Parameter | Description | Type | Mandatory | Default value |
---|---|---|---|---|
name | Variable name. Any $ prefix is ignored | string | true | - |
value | Fixed value to assign | any | false | - |
expression | Expression in OrientDB SQL language, to evaluate and assign | string | false | - |
Assign a value to the variable:
{ "let": { "name": "$filePath", "value": "/temp/myfile"} }
Concats the $fileName variable to $fileDirectory to create the new variable $filePath:
{ "let": { "name": "$filePath", "expression": "$fileDirectory.append( $fileName )"} }
Execute a snippet of code in any of the JVM supported languages. Default is Javascript.
Parameter | Description | Type | Mandatory | Default value |
---|---|---|---|---|
language | Programming language used | string | false | Javascript |
code | Code to execute | string | true | - |
{ "code": { "language": "Javascript",
"code": "print('Hello World!');"}
}
Execute commands invoking the OrientDB Console.
Parameter | Description | Type | Mandatory | Default value |
---|---|---|---|---|
file | File path containing the commands to execute | string | false | - |
commands | Array of commands, as string, to execute in sequence | string array | false | - |
Invoice the console with a file containing the commands to execute
{ "console": { "file": "/temp/commands.sql"} }
{ "console": {
"commands": [
"CONNECT plocal:/temp/db/mydb admin admin",
"INSERT INTO Account set name = 'Luca'"
] }
}