Skip to the content.

sql.evaluateResult

This action executes a sql statement on a relational database and evaluates if a result is returned or not. If a result is found (count > 0) then the evaluation is successful, otherwise it is considered as an error.

Use cases

Parameters

1: query

query: "any query to execute"

2: hasResult

hasResult: "Y" / "N"

3: connection

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

Examples

  - number: 1
    type: "sql.evaluateResult"
    name: "action1"
    description: "run an evaluation query expecting results"
    component: ""
    condition: ""
    iteration: ""
    errorExpected: "N"
    errorStop: "N"
    parameters:
    - name: "query"
      value : "select * from Table1"
    - name: "hasResult"
      value : "Y"
    - name: "connection"
      value : "sql.evaluateResult.1"
---
type: "script"
data:
  name: "sql.evaluateResult.1.2"
  description: "test sql.evaluateResult when data is expected taking input from a file"
  parameters: []
  actions:
  - number: 1
    type: "sql.evaluateResult"
    name: "action1"
    description: "run an evaluation query expecting results taking input from a file"
    component: ""
    condition: ""
    iteration: ""
    errorExpected: "N"
    errorStop: "N"
    parameters:
    - name: "query"
      value : ""
    - name: "hasResult"
      value : "Y"
    - name: "connection"
      value : "sql.evaluateResult.1"
---
type: "script"
data:
  name: "sql.evaluateResult.3"
  description: "test sql.evaluateResult when data is expected but not available"
  parameters: []
  actions:
  - number: 1
    type: "sql.evaluateResult"
    name: "action1"
    description: "run an evaluation query expecting results but not available"
    component: ""
    condition: ""
    iteration: ""
    errorExpected: "Y"
    errorStop: "N"
    parameters:
    - name: "query"
      value : "select * from Table1"
    - name: "hasResult"
      value : "Y"
    - name: "connection"
      value : "sql.evaluateResult.3"