Installation
Introduction
Section titled “Introduction”You can use the Snowflake Docker image to run the Snowflake emulator. The Snowflake Docker image is available on the LocalStack Docker Hub. To pull the Snowflake Docker image, execute the following command:
docker pull localstack/snowflake
You can start the Snowflake Docker container using the following methods:
localstack
CLI
Section titled “localstack CLI”To start the Snowflake Docker container using the localstack
CLI, execute the following command:
export LOCALSTACK_AUTH_TOKEN=<your_auth_token>localstack start --stack snowflake
docker
CLI
Section titled “docker CLI”To start the Snowflake Docker container using the docker
CLI, execute the following command:
docker run \ --rm -it \ -p 127.0.0.1:4566:4566 \ -p 127.0.0.1:4510-4559:4510-4559 \ -p 127.0.0.1:443:443 \ -e LOCALSTACK_AUTH_TOKEN=${LOCALSTACK_AUTH_TOKEN:?} \ localstack/snowflake
Docker Compose
Section titled “Docker Compose”Create a docker-compose.yml
file with the specified content:
version: "3.8"
services: localstack: container_name: "localstack-snowflake" image: localstack/snowflake ports: - "127.0.0.1:4566:4566" - "127.0.0.1:4510-4559:4510-4559" - "127.0.0.1:443:443" environment: - LOCALSTACK_AUTH_TOKEN=${LOCALSTACK_AUTH_TOKEN:?} volumes: - "./volume:/var/lib/localstack"
Start the Snowflake Docker container with the following command:
docker-compose up
Updating
Section titled “Updating”To update the Snowflake Docker container, pull the latest image and restart the container. The latest
tag is the nightly build of the Snowflake Docker image.
Troubleshooting
Section titled “Troubleshooting”How to check if the Snowflake emulator is running?
Section titled “How to check if the Snowflake emulator is running?”You can check if the Snowflake emulator is running by executing the following command:
curl -d '{}' snowflake.localhost.localstack.cloud:4566/session
The response should be:
{"success": true}
How to enable detailed debug logs?
Section titled “How to enable detailed debug logs?”You can set the SF_LOG=trace
environment variable in the Snowflake container to enable detailed trace logs that show all the request/response message.
When using docker-compose
then simply add this variable to the environment
section of the YAML configuration file.
If you’re starting up via the localstack start
CLI, then make sure to start up via the following configuration:
DOCKER_FLAGS='-e SF_LOG=trace' DEBUG=1 localstack start --stack snowflake
The snowflake.localhost.localstack.cloud
hostname doesn’t resolve on my machine, what can I do?
Section titled “The snowflake.localhost.localstack.cloud hostname doesn’t resolve on my machine, what can I do?”On some systems, including some newer versions of MacOS, the domain name snowflake.localhost.localstack.cloud
may not resolve properly.
If you are encountering network issues and your Snowflake client drivers are unable to connect to the emulator, you may need to manually add the following entry to your /etc/hosts
file:
127.0.0.1 snowflake.localhost.localstack.cloud
Next steps
Section titled “Next steps”Now that the Snowflake emulator is installed, you can use it for developing and testing your Snowflake data pipelines. Refer to our Quickstart guide to get started.