Snowflake

Version: 1.1.8

One platform that power the data cloud. Execute your most critical workloads on top of Snowflake's multi-cluster shared data architecture in a fully managed way.

Connect Snowflake with Logichub

  1. Navigate to Automations > Integrations.
  2. Search for Snowflake.
  3. Click Details, then the + icon. Enter the required information in the following fields.
    • Label: Connection name.
    • Reference Values: Define variables here to templatize integration connections and actions. For example, you can use https://www.{{hostname}}.com where, hostname is a variable defined in this input. For more information on how to add data, see 'Add Data' Input Type for Integrations.
    • Verify SSL: Select option to verify connecting server's SSL certificate (Default is Verify SSL Certificate).
    • Account Identifier: Account Identifier for the Snowflake API. Example: 'ip12345.ap-south-1.aws'
    • User: User for the Snowflake API. Example: 'USER123'
    • Private Key .p8 file: Private Key.
    • Private Key Passphrase: Private key passphrase.
  4. After you've entered all the details, click Connect.

Execute Statement

Execute statement.

Input Field

Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.

Input NameDescriptionRequired
BodyJinja-templated JSON field containing the body of the request for the Snowflake API. Example: '{"schema": "TESTSCHEMA", "warehouse": "TESTWH"}'Optional
Additional ParamsJinja-templated JSON field containing the additional params for the Snowflake API. Example: '{"nullable": false}'Optional
StatementJinja-templated text containing the statement for the snowflake API. Example: 'SELECT current_version()'Required

Output

JSON containing the following items:

{
  "createdOn": 1670836190471,
  "data": [
    [
      "6.40.1"
    ]
  ],
  "sqlState": "00000",
  "code": "090001",
  "statementHandle": "01a8ea65-0000-4186-0000-000445d6f139",
  "has_error": false,
  "error": null,
  "statementStatusUrl": "/api/v2/statements/01a8ea65-0000-4186-0000-000445d6f139?requestId=acbb1a88-e696-4192-a529-fd484ec63579",
  "message": "Statement executed successfully.",
  "requestId": "acbb1a88-e696-4192-a529-fd484ec63579",
  "resultSetMetaData": {
    "numRows": 1,
    "format": "jsonv2",
    "partitionInfo": [
      {
        "rowCount": 1,
        "uncompressedSize": 10
      }
    ],
    "rowType": [
      {
        "name": "CURRENT_VERSION()",
        "database": "",
        "schema": "",
        "table": "",
        "scale": null,
        "precision": null,
        "type": "text",
        "byteLength": 16777216,
        "nullable": true,
        "collation": null,
        "length": 16777216
      }
    ]
  }
}

Handle Statement

To check the status of the execution of a statement. If the statement has been executed successfully, the body of the response includes a ResultSet object containing the requested data.

Input Field

Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.

Input NameDescriptionRequired
Statement HandleJinja templated text containing the statement handle. Example: '01a9229f-0000-42d9-0004-45d60001c00a'Required
Additional ParamsJinja templated JSON field containing the additional params for the Snowflake API. Example: '{"requestId": "230942f02-0000-42d9-0004-3fh23ru3223"}'Optional
Max RetriesJinja templated text field containing max no. of calls to hit the API. (Default is 10)Optional
Wait between callsJinja templated text containing the wait between the calls (in seconds). (Default is 2)Optional

Output

JSON containing the following items:

{
  "createdOn": 1670836190471,
  "data": [
    [
      "6.40.1"
    ]
  ],
  "sqlState": "00000",
  "code": "090001",
  "statementHandle": "01a8ea65-0000-4186-0000-000445d6f139",
  "has_error": false,
  "error": null,
  "statementStatusUrl": "/api/v2/statements/01a8ea65-0000-4186-0000-000445d6f139?requestId=acbb1a88-e696-4192-a529-fd484ec63579",
  "message": "Statement executed successfully.",
  "requestId": "acbb1a88-e696-4192-a529-fd484ec63579",
  "resultSetMetaData": {
    "numRows": 1,
    "format": "jsonv2",
    "partitionInfo": [
      {
        "rowCount": 1,
        "uncompressedSize": 10
      }
    ],
    "rowType": [
      {
        "name": "CURRENT_VERSION()",
        "database": "",
        "schema": "",
        "table": "",
        "scale": null,
        "precision": null,
        "type": "text",
        "byteLength": 16777216,
        "nullable": true,
        "collation": null,
        "length": 16777216
      }
    ]
  }
}

Release Notes

  • v1.1.8 - Updated architecture to support IO via filesystem
  • v1.1.1 - Added new action: Handle Statement.
  • v1.0.2 - Integration with Snowflake is introduced with the action: Execute Statement.

© Devo Technology Inc. All Rights Reserved.