🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

localstack-extension-snowflake

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

localstack-extension-snowflake

LocalStack Extension: Snowflake

0.1.24
Maintainers
2

LocalStack - A fully functional local cloud stack

PyPI Version Docker Pulls PyPi downloads Code style: black Twitter

LocalStack is a cloud software development framework to develop and test your Snowflake data pipelines locally.

OverviewInstallQuickstartBase Image TagsReleasesSupportLicense
📖 Docs☑️ Function coverage

Overview

LocalStack is a cloud service emulator that runs in a single container on your laptop or in your CI environment. LocalStack Snowflake emulator replicates the functionality of the real Snowflake platform, allowing you to perform operations without an internet connection or a Snowflake account. This is valuable for developing and testing Snowflake data pipelines entirely on the local machine (and in CI pipelines), enabling quick feedback cycles, and not incurring costs of using the real system.

LocalStack Snowflake emulator supports the following features:

Install

You can use the Snowflake Docker image to run the LocalStack 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:

Note: Before starting, ensure you have a valid LOCALSTACK_AUTH_TOKEN to access the LocalStack Snowflake emulator. Refer to the Auth Token guide to obtain your Auth Token and specify it in the LOCALSTACK_AUTH_TOKEN environment variable.

localstack CLI

To start the Snowflake Docker container using the localstack CLI, execute the following command:

export LOCALSTACK_AUTH_TOKEN=<your-auth-token>
IMAGE_NAME=localstack/snowflake localstack start

docker CLI

To start the Snowflake Docker container using the docker CLI, execute 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"

Start the Snowflake Docker container with the following command:

docker-compose up

Quickstart

After starting the Snowflake Docker container, 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",
)
connection.cursor().execute("CREATE TABLE table1(col1 INT)")

Check out our documentation for more examples and guides.

Base Image Tags

We currently push the latest tag as our default tag. This tag is fully tested using our extensive integration test suite. This tag should be used if you want to stay up-to-date with the latest changes.

Releases

Please refer to our changelog page to see the complete list of changes for each release.

Support

Get in touch with the LocalStack Team to report issues & request new features, on the following channels:

License

(c) 2024 LocalStack

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts