Skip to Content
DevelopOperationsexecute

execute operation

The execute operation executes non-query SQL statements in a specified source. After each statement, you must add go command on its own line to indicate the end of the statement.

Note that the go is a Sequor-specific command and should not be confused with the GO command in Microsoft SQL Server.

Parameters are:

  • id (type: str, optional) - unique id of the operation in the flow
  • source (type: str, required) - name of the source where statements will be executed
  • statement (type: str, required) - SQL statements separated by the go command

Examples

- op: execute id: create_example_table source: "postgres" # Notice go command that must be added on its own line after each statement statement: | drop table if exists database_ops_users; go create table database_ops_users ( id text, first_name text, last_name text ); go insert into database_ops_users (id, first_name, last_name) values (1, 'Bob', 'Smith'), (2, 'Jane', 'Brown'); go
Last updated on