All Collections
Integrations
Snowflake integration
Authenticating and configuring the Snowflake connector
Authenticating and configuring the Snowflake connector
S
Written by Sara Jaffer
Updated over a week ago

Authenticating with Snowflake

Inventory Planner uses the Snowflake SQL API and Key Pair Authentication to access Snowflake. Please see Snowflake’s Key Pair Authentication & Key Pair Rotation document for configuration steps.

Note that in order to authenticate, you will need to have the Snowflake SECURITYADMIN role.

It’s recommended to create a separate user (e.g. “INVENTORY_PLANNER”) with a dedicated role to support better access management. The role will require USAGE and SELECT privileges for reading the data on the relevant tables. In addition, pushing stock orders requires INSERT and DELETE privileges. See Snowflake’s Configuring Access Control documentation for further information.

The list below displays the steps needed to configure and verify authentication with. Steps 1-6 are described in Snowflake’s Key Pair Authentication & Key Pair Rotation documentation.

If you are getting an access denied or table not found error, please make sure to set the DEFAULT_ROLE for the user.

Configuring the Snowflake connector

Once you have authenticated with Snowflake, you can configure the connector. The configuration is comprised of the following settings:

  • Account ID: Snowflake account ID

  • User: Snowflake username

  • Warehouse: The Snowflake warehouse to use

    • Leave this empty to use the default user warehouse as set in Snowflake

  • Database: The Snowflake database to use

    • Leave this empty to use the default user database as set in Snowflake

  • Schema: The Snowflake schema to use

    • Leave this empty to specify the schema as part of the table names below

  • Public key: Public key generated during authentication (link)

  • Private key: Private key generated during authentication (link)

  • Tables (Warehouses, variants, variant components, variant warehouses, vendors, variant vendors, sales orders, purchase orders, transfers, assembly orders, stock orders): Names of the entity tables in Snowflake

    • Should be set, but see below for notes on specific use cases

  • Connection for variant ID: Use variant IDs from a different connection

    • Should normally be empty unless using a hybrid configuration

  • Connection currency: The main currency of the connection

    • Usually the currency in which the business mainly operates

Specific use cases

If you do not use bundles or assemblies, the variant component table can be left empty.

If there is a single warehouse containing the required fields, the variant warehouse table and the variant vendor table can be specified to be the same as the variant table.

The vendors and variant vendors tables can also be skipped if you’d like to manage this data in Inventory Planner.

The transfers table and assembly orders table can be left empty if you don’t use transfers or assemblies.

Hybrid configuration

By default, Inventory Planner is configured to pull all data from Snowflake, including warehouses, variants, vendors, sales, and stock orders. Inventory Planner also supports an advanced hybrid configuration where some entities pull from a different connection, but it requires data to be consistent between the systems. If you are interested in using a hybrid configuration, please contact our team.

Data verification

Inventory Planner’s functionality depends on the correct data being input. Once the connection is configured and the initial sync performed, the following verification steps are recommended:

  • Check the numbers on the Overview screen:

    • Variants, Stock units and other counts should be non-zero

    • If there are purchase orders, the Active purchase orders and On order counts should also be non-zero

    • Replenishment is usually non-zero

    • Sales and Best sellers usually display some data

  • Choose a particular variant and compare the numbers from the Inventory Planner KPI report to Snowflake. Metrics to compare include In Stock, Sales, Price, Vendor/Cost Price.

  • Check the Total tab in the KPI report for a day or a month and compare the Sales (units) or Revenue with the data provided. The order of magnitude should match.

Did this answer your question?