This is the implementation of the Snowflake data handler for MindsDB.

Snowflake is a cloud data warehouse that stores and analyzes data. It can automatically scale up/down its compute resources to load, integrate, and analyze data.


This handler is implemented using the Snowflake connector.

The required arguments to establish a connection are as follows:

  • host is the host name or IP address. The host name comes from the Snowflake link (for example,
  • port is the port used to make TCP/IP connection.
  • database is the database name. You can find it in the Snowflake dashboard under the Databases tab.
  • user is the database user.
  • password is the database password.
  • account is the Snowflake account. The account name comes from the Snowflake link (for example,
  • schema is the default schema name used to query the database.
  • protocol is the protocol that defaults to https if left blank.
  • warehouse is the warehouse account. You can find it in the Snowflake dashboard under the Warehouses tab.

If you installed MindsDB locally via pip, you need to install all handler dependencies manually. To do so, go to the handler’s folder (mindsdb/integrations/handlers/snowflake_handler) and run this command: pip install -r requirements.txt.


In order to make use of this handler and connect to the Snowflake database in MindsDB, the following syntax can be used:

CREATE DATABASE snowflake_datasource
    ENGINE = 'snowflake',
    "host": "",
    "port": 443,
    "database": "database_name",
    "user": "user",
    "password": "password",
    "account": "",
    "schema": "schema_name",
    "protocol": "https",
    "warehouse": "warehouse_name"

You can use this established connection to query your table as follows:

FROM snowflake_datasource.example_table;

Please note that the above query uses the provided schema implicitly so it is equivalent to the following:

FROM snowflake_datasource.schema_name.example_table;

If you have access to other schemas available in the connected Snowflake database, then you can query them as below:

FROM snowflake_datasource.other_schema_name.example_table;