Snowflake

Introduction

Faraday easily integrates with Snowflake, enabling you to embed AI-powered predictive analytics anywhere else in your stack. Discover your brand's bespoke personas, score your customers for churn risk, find repeat purchasers, and more, enabling you to confidently engage the right customers, at the right time, with personalized, relevant content. The best part? No code—and no PhD—required.

Getting started

Make sure you have a Faraday account (signup is free!) and that it's not in test mode.

Prerequisites

You'll need the following details to create your connection to Snowflake:

Connection

Setting up your connection

First, you'll need to grant Faraday access to Snowflake.

Snowflake connections require determining the "organization name" and "account name" in addition to a user and password. We suggest that you create a Faraday-only schema to both send and receive data. Within this schema, Faraday would have full read and write access. Alternatively, you can give Faraday access to certain tables in a shared schema.

Example commands:

  • CREATE USER FARADAY_USER
ALTER USER FARADAY_USER SET
RSA_PUBLIC_KEY='MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAveZjTXJEJzFSUqrw/U1u
OBEzdNXWf19AzcTl5r1UOyTOjC5iHhi3BFPE0oYwCdpo1aYmkJqunzzaMCHexS4T
TxStCfxpFwV2gjB2SvT+eIE6e3HM8uizuWv9ENYW8r5pGUkwsOcg9jQKm017IfUG
iSQeZkllX1ZZRxPb/pjim4uyWU49WNeF/hr0kIpd6I/r2Pph7UmOxbuTGpb9wkko
bsoevjGVjzlhQOFZc6roYMBVLXkGiJTVMHX9eKa/QRf1KQMmM5VwWaRGO7VUx6+r
pZHQvNXDfMaY3gErx5UsCq3xxhqTV07T4IuCP1C7vPIhn5/xJBxR/yv6x9hS/Czn
07IPhCL3WRFa2OMCeHwnw90J10aNqAJmWrMccbC6VIInK6Vv/rbpOYfhsI4Wu9PJ
Ia6cm4g1kv2Mz7m7VhHpZAVIPKLxg0E7bsNQjx+XxfSV3dyq2kblKs+Ki5J2JUFw
hhMKTGiEDO2rxbnqKAiOEUlFpi9RbS+lWep+rREvj0XTE3f4rV+i3JdgeyACJ+Ua
uqCaVbmFPWtKca7D1bSwBnvf6TURSK2FLhHFC80NRMNXi3fkakL8y7XrmVBttzg3
wdVq+g/+DtYsmtb/Z+pcm1joGsLt3lyKUc6/w/1fbZi+svDhW2E7JvijuBmNgSSO
Q3Zs5aVfZyX2Hn/b35UmZtUCAwEAAQ=='
  • CREATE ROLE FARADAY_ROLE
  • GRANT ROLE FARADAY_ROLE TO USER FARADAY_USER
  • GRANT USAGE ON WAREHOUSE <WAREHOUSE_NAME> TO FARADAY_ROLE
  • GRANT USAGE ON DATABASE <DATABASE_NAME> TO ROLE FARADAY_ROLE
  • GRANT USAGE ON SCHEMA <DATABASE_NAME>.FARADAY_SCHEMA TO ROLE FARADAY_ROLE
  • GRANT ALL PRIVILEGES ON SCHEMA <DATABASE_NAME>.FARADAY_SCHEMA TO ROLE FARADAY_ROLE
  • GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA <DATABASE_NAME>.FARADAY_SCHEMA TO ROLE FARADAY_ROLE
  • GRANT ALL PRIVILEGES ON FUTURE TABLES IN SCHEMA <DATABASE_NAME>.FARADAY_SCHEMA TO ROLE FARADAY_ROLE

Faraday suggests that you use an unguessable string somewhere in the path to your data. This avoids what is called the Confused deputy problem

Creating your connection

Now you can connect Faraday to Snowflake.

  • In the navigation sidebar, choose Connections. Screenshot of the empty connections list
  • Click the New Connection button.
  • Fill out the form
    • Choose Snowflake.
    • Skip "Step 1" — you've already completed it!
    • For "Step 2," fill out the connection details you gathered above.
    • Enter a memorable name, like "My Snowflake connection". Screenshot of the new connection form, filled out
    • Click the Save connection button.

Screenshot of the connections list with the correct connections showing
Wait briefly while Faraday establishes your connection. It shouldn't take long.

Your new connection is now ready to use!


📘

  1. Due to the fact that Faraday utilizes RSA keypair authentication, do not set a password for the USER in Snowflake.

  2. You may need to set a NETWORK_POLICY and allowlist Faraday IPs. The newly created NETWORK_POLICY needs to be assigned to the USER created for access.

  3. At this time we only support the following Snowflake datatypes in tables.

  • NUMBER
  • DECIMAL
  • NUMERIC
  • INT
  • INTEGER
  • BIGINT
  • SMALLINT
  • FLOAT
  • FLOAT4
  • FLOAT8
  • DOUBLE
  • DOUBLE PRECISION
  • REAL
  • TEXT
  • VARCHAR
  • CHAR
  • CHARACTER
  • STRING
  • DATE
  • DATETIME
  • TIMESTAMP
  • TIMESTAMP_LTZ
  • TIMESTAMP_TZ
  • TIMESTAMP_NTZ
  • BOOLEAN
  • VARIANT
  1. Keep in mind that if your Snowflake identifiers have case-sensitivity you will have the opportunity to configure that at the dataset level.

  2. Please provide an

  • Organization name and Account name together OR
  • a Legacy account locator by itself.