About the Snowflake category

Put topics about this connector package here.
Always check the ‘How to use the Alumio connector packages’ topic.

Extra information

Connector package documentation:
System documentation:

Snowflake

Setting up HTTP Client Snowflake

Steps

  1. In Alumio Dashboard, go to Clients > HTTPS Client. Create a new HTTP Client and select Snowflake HTTP Client as the prototype of the HTTP Client.
  2. Fill in the Base URI, and Choose the Authentication Type.
  • External Oauth2
    • Fill in the Client ID, Client Secret, Username, Password, Token URL, and Scopes (optional)
  • Snowflake Oauth2
    • Fill in the Client ID, Client Secret, Token URL, and Scopes (Optional)
  1. Press “Grant Access to Snowflake”
  2. Save

Subscribing to Entities from Snowflake

Steps

  1. Go to Connections → Incoming and create a new incoming configuration and select Snowflake Subscriber as the subscriber.
  2. Select the entity you want to subscribe from Snowflake.
  3. Add any request parameters needed to subscribe to the entity.
  4. You can optionally add a transformer to transform the request parameters into something you need.
  5. Select the Snowflake HTTP Client to use.

General Concept

We follow Snowflake documentation on building this connector so you can easily use the connector based on Snowflake API Reference.

Entity
It’s the entity you want to subscribe from Snowflake. Please refer to the entities in Management APIs from the Snowflake API Reference page. (For more information about Entity Check Extra Notes Below)

Request Parameters
These are the parameters you can provide to get the needed entity based on Snowflake API Reference. Please look at the example below on how to fill the Request Parameters field when making a statement entity

The properties inside query parameters will be parsed as query parameters. Here is the final URL that will be called when using such Request Parameters field.

/api/v2/statements

Heres the Payload that we use

{
  "path": [],
  "query": [],
  "payload": {
    "schema": "LOCATION",
    "timeout": 60,
    "database": "TEST_DB",
    "statement": "select * from MAIN",
    "warehouse": "COMPUTE_WH",
    "resultSetMetaData": {
      "format": "json"
    }
  }
}

Input Transformer

Any transformers set here will be executed after the Request Parameters are loaded. So, you basically can add any transformer to provide and transform the request parameters into anything you need either as path parameters and/or as query parameters of an entity.

HTTP Client

It’s the HTTP Client configuration or prototype you will use to access Snowflake.

Publishing Entity to Snowflake

Steps

  1. Go to Connections → Outgoing, create a new outgoing configuration, and select Snowflake Publisher as the publisher.
  2. Select the action that you want the publisher to do with the data.
  3. Select the Snowflake entity you want the data to be published.
  4. Select the HTTP Client to use.

General Concept

Like the subscriber, the publisher has similar methods on how to use it. The difference is the payload that will be submitted by the publisher originating from the data (from routes, from transformers in outgoing configuration).

Entity
We support publishing to most Snowflake endpoints. Please refer to the entities in Management APIs from the Snowflake API Reference page. Based on the documentation, some endpoints may need one or more path parameters.

For endpoints that require an object as the request payload, please look at the example below. For example, we want to Make Statements. Please select “Statements” as the entity of the publisher.

You can put the payload you want to send to Snowflake into the payload property in the data.

Alumio will send an API request to Snowflake with URL /api/v2/statements

HTTP Client
It’s the HTTP Client configuration or prototype you will use to access Snowflake.

Extra Notes

This is the Endpoint on Subscriber

"endpoint": [
"POST###/api/v2/statements/",
"GET###/api/v2/statements/{{statementHandle}}"
],
"Names": [
"Statements",
"Statements (w/statementHandle)"
]

This is the Endpoint on Publisher

"enum": [
"/api/v2/statements/",
"/api/v2/statements/{{statementHandle}}/cancel"
],
"enumNames": [
"Statements",
"Statements (w/statementHandle/cancel)"
]