Snowflake - SQL REST API

v0.0.0

📘

Check out the Snowflake SQL REST API docs here for more information.

Set up


To set up the Snowflake connector you will need:

  • Client-id
  • Client-secret
  • Username
  • Password
  • Snowflake Account Identifier
  • Account Role
  • Account Warehouse

OAuth needs to be set up in your snowflake account to be able to access the client-id and client-secret. To setup OAuth, an account administrator (ACCOUNTADMIN) will need to create a Snowflake Security Integration using the following statements to integrate Kleene:

CREATE OR REPLACE SECURITY INTEGRATION <<YOUR_OAUTH_CLIENT_NAME>>
TYPE = OAUTH
ENABLED = TRUE
OAUTH_CLIENT = CUSTOM
OAUTH_CLIENT_TYPE = 'CONFIDENTIAL'
OAUTH_REDIRECT_URI = 'https://app.kleene.ai/callback.html'
OAUTH_ISSUE_REFRESH_TOKENS = TRUE
OAUTH_REFRESH_TOKEN_VALIDITY = 7776000;

Then you can retrieve your client-id and client-secret from the created Security Integration, using the two commands below.

-- This will return a table including an entry for OAUTH_CLIENT_ID
DESC SECURITY INTEGRATION <<YOUR_OAUTH_CLIENT_NAME>>;

-- This will show the corresponding OAUTH_CLIENT_SECRET
SELECT SYSTEM$SHOW_OAUTH_CLIENT_SECRETS('<<YOUR_OAUTH_CLIENT_NAME>>');

The Username, Password are the user snowflake login credentials. Account Role and Account Warehouse are the default role and warehouse assigned to the user on logging into Snowflake. Lastly, the Snowflake Account Identifier would be the Snowflake account URL excluding the https:// protocol sub-part.

Features


FeatureSupportNotes
Backfillℹī¸Loads in the entire table
Incremental❌Incremental not supported
API reliabilityđŸŸĸReliable

Reports detail


âŦ‡ī¸ Report🔑 Incremental key🔑 Primary key📄 Link to API endpoint
TableN/AN/ASubmitting SQL statement
Custom StatementN/AN/A^

📘

Custom Statement

This report allows you to submit a SQL statement that you would like executed against the Snowflake account, provided the user has the necessary privileges to perform the operation.

SELECT * 
FROM <<dabatabase_name>>.<<schema>>.<<table_name>>; 

🚧

Table Permission

To read a table via the Snowflake connector, the user role will need a minimum of a Select usage privileges on the table, as well as its corresponding schema and warehouse.