SQL Script
    • Dark
      Light

    SQL Script

    • Dark
      Light

    Article Summary

    Icon

    SQL Script Component (Orchestration)

    Write your own custom SQL script.

    The SQL script can contain multiple SQL statements. However, since there is no way to recover the output of the script, the statements should not be SELECT. If you wish to write SELECT queries, the SQL transformation component allows for custom SELECT statements where the output can be used as part of the transformation flow.

    There is no guarantee that multiple SQL statements will always run in the same session.

    It is advised to avoid using transaction control statements such as commit or rollback in your scripts. For that, please use the transaction control components in the orchestration job. If you use the statements in a script, Matillion ETL will not be aware of the change in transaction behavior.

    Snowflake users: Matillion ETL for Snowflake executes each query within an SQL Script component using a connection from a connections pool, meaning that each query may be executed by a different connection. When connections in the pool are first created, they will use the Snowflake warehouse that you have defined as the default in the environment configuration.

    Redshift users: Matillion ETL for Amazon Redshift executes all queries within an SQL Script component using the same connection. During these operations, that connection will not be used by any other resources.


    Properties

    PropertySettingDescription
    NameStringA human-readable name for the component.
    SQL ScriptSQL ScriptThe SQL script. Variables can be referenced with the syntax: ${<variable name>}. Read Variables to learn more.

    Strategy

    Inserts your custom SQL statement.


    What's Next