Skip to the content.

sql.setRuntimeVariables

This action executes a sql statement on a relational database and stores the result as runtime variables that can be used by other actions. The column names in the sql statement will be used as variable name, the query result as variable value. Therefore, only 1 row is expected to be returned as result.

Use cases

Parameters

1: query

query: "any query to execute"

2: connection

connection: "connection where the query needs to be executed on"

Examples

  - number: 1
    type: "sql.setRuntimeVariables"
    name: "action1"
    description: "run a sql select query and store results as runtime variables"
    component: ""
    condition: ""
    iteration: ""
    errorExpected: "N"
    errorStop: "N"
    parameters:
    - name: "query"
      value : "select Field1, Field2, Field3 from Table1 where Field1 = 1"
    - name: "connection"
      value : "sql.setRuntimeVariables.1"
  - number: 1
    type: "sql.setRuntimeVariables"
    name: "action1"
    description: "run a sql select query taking input from a file"
    component: ""
    condition: ""
    iteration: ""
    errorExpected: "N"
    errorStop: "N"
    parameters:
    - name: "query"
      value : ""
    - name: "connection"
      value : "sql.setRuntimeVariables.3"