1. Tasks
  2. StubberDB Run SQL Task

Tasks

StubberDB Run SQL Task

Executes arbitrary SQL commands against a configured StubberDB connection

WARNING

This task and feature is still in early access and may be subject to change. Please reach out to your Stubber representative if you are interested in using or learning more about this task.

NOTE

The selected StubberDB must be configured on the organization before this task can run.

Basic usage

loading...

Parameters

role
optional
string

The role to run the SQL query with.

Supported values:

  • readonly
  • readwrite

Default: readonly


sql
required
string

The SQL query to execute.


name
optional
string

The name of the StubberDB configuration to use. If this is omitted, the task uses the default StubberDB configured for the organization.

Default: default

Result

loading...

Properties

command
string

The SQL command that was executed, for example SELECT, INSERT, UPDATE, or DELETE.


row_count
number

The number of rows returned or affected by the query.


rows
array

The rows returned by the query. For write operations such as UPDATE or DELETE, this is usually an empty array unless the query explicitly returns rows.

Examples

Update data with the readwrite role

Use the readwrite role for statements that modify data.

loading...

Insert data and return the created row

loading...