localstack/snowflake
LocalStack is a cloud software development platform to develop and test your Snowflake data pipeline
10K+
LocalStack for Snowflake helps software and data teams save on Snowflake Cloud costs by running dev and staging workflows on locally deployable, Snowflake-compatible development and CI environments.
LocalStack for Snowflake supports the following features:
The easiest way to get started with LocalStack for Snowflake is to download and run the LocalStack for Snowflake Docker image, available on Docker Hub:
docker pull localstack/snowflake:latest
NOTE: LocalStack for Snowflake requires a valid LocalStack auth token,
configured as environment variable LOCALSTACK_AUTH_TOKEN
, to work. Refer to
the LocalStack auth token
guide for more
details.
localstack
Assuming the localstack
CLI is installed and configured correctly, you can
start the LocalStack for Snowflake instance via the following command:
LOCALSTACK_AUTH_TOKEN=<your_auth_token> \
IMAGE_NAME=localstack/snowflake \
localstack start
docker
Assuming the docker
CLI is installed and correctly configured, you can start
the LocalStack for Snowflake instance via the following command:
docker run \
--rm -it \
-p 4566:4566 \
-e LOCALSTACK_AUTH_TOKEN=${LOCALSTACK_AUTH_TOKEN:?} \
localstack/snowflake
docker-compose
Create a docker-compose.yml
file with the specified content:
version: "3.8"
services:
localstack:
container_name: "localstack-main"
image: localstack/snowflake
ports:
- "127.0.0.1:4566:4566"
environment:
- LOCALSTACK_AUTH_TOKEN=${LOCALSTACK_AUTH_TOKEN:?}
volumes:
- "./volume:/var/lib/localstack"
Assuming the docker
CLI command is installed and configured correctly, start
the Snowflake Docker container with the following command:
docker compose up
After starting the LocalStack for Snowflake instance, you can use the Snowflake Python Connector to interact with the LocalStack Snowflake emulator. The following example demonstrates how to create a Snowflake table using the Snowflake Python Connector:
connection = snowflake.connector.connect(
user="test",
password="test",
account="test",
database="test",
host="snowflake.localhost.localstack.cloud", # For instances that run on the same machine as the client
port=4566 # Use port 4566 for non-SSL, 443 for SSL connections
)
connection.cursor().execute("CREATE TABLE table1(col1 INT)")
Check out our documentation for more examples and guides.
Refer to the online changelog to see the complete list of changes for each release.
To get in touch with LocalStack to report issues and request new features, reach out on the following channels:
Additional developer documentation can be found here.
© 2024 LocalStack - All Rights Reserved
The LocalStack for Snowflake image is proprietary software and is subject to the LocalStack terms and conditions. Unauthorized use, reproduction, or distribution is prohibited.
docker pull localstack/snowflake