Important!When querying data from Snowflake, MindsDB automatically converts column names to lower-case. To prevent this, users can provide an alias name as shown below.This update is introduced with the MindsDB version 25.3.4.1. It is not backward-compatible and has the following implications:Here is the output:
- Queries to Snowflake will return column names in lower-case from now on.
- The models created with Snowflake as a data source must be recreated.
Prerequisites
Before proceeding, ensure the following prerequisites are met:- Install MindsDB locally via Docker or Docker Desktop.
- To connect Snowflake to MindsDB, install the required dependencies following this instruction.
Connection
Establish a connection to your Snowflake database from MindsDB by executing the following SQL command:account
: The Snowflake account identifier. This guide will help you find your account identifier.user
: The username for the Snowflake account.password
: The password for the Snowflake account.database
: The name of the Snowflake database to connect to.
warehouse
: The Snowflake warehouse to use for running queries.schema
: The database schema to use within the Snowflake database. Default isPUBLIC
.role
: The Snowflake role to use.
Usage
Connect to the Snowflake database:Troubleshooting Guide
Database Connection Error
- Symptoms: Failure to connect MindsDB with the Snowflake account.
- Checklist:
- Make sure the Snowflake is active.
- Confirm that account, user, password and database are correct. Try a direct Snowflake connection using a client like DBeaver.
- Ensure a stable network between MindsDB and Snowflake.
SQL statement cannot be parsed by mindsdb_sql
- Symptoms: SQL queries failing or not recognizing table names containing spaces or special characters.
- Checklist:
- Ensure table names with spaces or special characters are enclosed in backticks.
- Examples:
- Incorrect: SELECT * FROM integration.travel data
- Incorrect: SELECT * FROM integration.‘travel data’
- Correct: SELECT * FROM integration.`travel data`