OrientDB Manual 1.7.8

ETL - BLocks

Block components execute operations.

Available Blocks

let code console

let

Assigns variable in the ETL process context.

  • Component name: let

Syntax

Parameter Description Type Mandatory Default value
name Variable name. Any $ prefix is ignored string true -
value Value to assign any true -

Example

Concats the $fileName variable to $fileDirectory to create the new variable $filePath:

{ "let": { "name": "$filePath",  "value": "$fileDirectory.append( $fileName )"} }

code

Execute a snippet of code in any of the JVM supported languages. Default is Javascript.

  • Component name: code

Syntax

Parameter Description Type Mandatory Default value
language Programming language used string false Javascript
code Code to execute string true -

Example

{ "code": { "language": "Javascript",
            "code": "print('Hello World!');"}
}

Console

Execute commands invoking the OrientDB Console.

  • Component name: console

Syntax

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 -

Example

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'"
  ] }
}