Skip to main content

Snowflake CLI Tools: generate a Data Catalog and Dependency Graph on top of the official Snowflake CLI; includes parallel query helpers and advanced lineage features

Project description

SnowCLI Tools

Powerful Snowflake operations with AI assistant integration

Transform your Snowflake data operations with automated cataloging, advanced lineage analysis, and seamless AI assistant connectivity through MCP (Model Context Protocol).

PyPI version Python 3.12+

Quick Start

# 1. Install SnowCLI Tools
pip install snowcli-tools

# 2. Set up your Snowflake profile
snow connection add --connection-name "my-profile" \
  --account "your-account.region" --user "your-username" \
  --private-key-file "/path/to/key.p8" --database "DB" --warehouse "WH"

# 3. Verify connection
snowflake-cli verify -p my-profile

# 4. Start exploring your data
snowflake-cli catalog -p my-profile
snowflake-cli lineage MY_TABLE -p my-profile

# 5. Enable AI assistant integration
SNOWFLAKE_PROFILE=my-profile snowflake-cli mcp

Core Features

๐Ÿ“Š Data Discovery & Analysis

  • Automated Catalog: Complete metadata extraction from databases, schemas, tables
  • Advanced Lineage: Column-level lineage tracking with impact analysis
  • Dependency Mapping: Visual object relationships and circular dependency detection
  • External Integration: S3/Azure/GCS source mapping

๐Ÿค– AI Assistant Integration

  • MCP Server: Direct integration with Claude Code, VS Code, Cursor
  • Natural Language: "Show me schema of CUSTOMERS" โ†’ instant results
  • Health Monitoring: Real-time diagnostics and validation
  • Enhanced Profiles: Clear error messages instead of timeouts

โšก Enterprise Ready

  • Layered Security: Built on Snowflake's official authentication
  • High Performance: Parallel operations and connection pooling
  • Fault Tolerance: Circuit breaker patterns for reliability
  • Modern Architecture: Python 3.12+ with async support

Architecture

SnowCLI Tools uses a layered architecture that combines official Snowflake tools with enhanced analytics:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚     AI Assistants & Applications    โ”‚  โ† Your workflows
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚      SnowCLI Tools MCP Server       โ”‚  โ† Enhanced analytics
โ”‚   (Catalog, Lineage, Dependencies)  โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚       Snowflake Labs MCP            โ”‚  โ† Official foundation
โ”‚    (Auth, Connection, Security)     โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚        Snowflake Platform           โ”‚  โ† Your data warehouse
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Key Benefits:

  • ๐Ÿ” Secure: Leverages Snowflake's official authentication
  • ๐Ÿš€ Powerful: Combines official tools with advanced analytics
  • ๐Ÿ”— Integrated: Single MCP endpoint for AI assistants
  • ๐Ÿ“ˆ Scalable: Service layer architecture for extensibility

Common Use Cases

Data Discovery Workflow

# Build comprehensive catalog
snowflake-cli catalog -p prod

# Map dependencies
snowflake-cli depgraph -p prod --format dot

# Analyze critical table lineage
snowflake-cli lineage CUSTOMER_ORDERS -p prod --depth 3

AI Assistant Integration

# Start MCP server for AI assistants
SNOWFLAKE_PROFILE=prod snowflake-cli mcp

# Now use Claude Code, VS Code, or Cursor to:
# - "What tables depend on CUSTOMERS?"
# - "Show me the schema for ORDERS table"
# - "Generate a data quality report"

Multi-Environment Development

# Switch between environments easily
snowflake-cli query "SELECT COUNT(*) FROM users" -p dev
snowflake-cli query "SELECT COUNT(*) FROM users" -p staging
snowflake-cli query "SELECT COUNT(*) FROM users" -p prod

Getting Started

Prerequisites

  • Python 3.12+ with pip or uv
  • Snowflake account with appropriate permissions
  • Snowflake CLI installed (pip install snowflake-cli)

Installation Options

Option 1: PyPI (Recommended)

pip install snowcli-tools

Option 2: Development Install

git clone <repository-url>
cd snowcli-tools
uv sync  # or pip install -e .

Profile Setup

# Key-pair authentication (recommended)
snow connection add --connection-name "my-profile" \
  --account "your-account.region" \
  --user "username" \
  --private-key-file "/path/to/key.p8" \
  --database "DATABASE" \
  --warehouse "WAREHOUSE"

# OAuth authentication
snow connection add --connection-name "my-profile" \
  --account "your-account.region" \
  --user "username" \
  --authenticator "externalbrowser"

# Verify setup
snowflake-cli verify -p my-profile

Documentation

Requirements

  • Python: 3.12 or higher
  • Snowflake CLI: Latest version recommended
  • Dependencies: Automatically installed with package
  • Permissions: USAGE on warehouse/database/schema, SELECT on INFORMATION_SCHEMA

MCP Integration

For AI assistant integration, install MCP extras:

# Install MCP dependencies
pip install "mcp>=1.0.0" "fastmcp>=2.8.1" "snowflake-labs-mcp>=1.3.3"

# Start MCP server
SNOWFLAKE_PROFILE=my-profile snowflake-cli mcp

# Configure your AI assistant to connect via MCP

Supported AI Assistants:

  • Claude Code
  • VS Code with MCP extensions
  • Cursor IDE
  • Any MCP-compatible client

Support

  • Documentation: Comprehensive guides in /docs
  • Issues: Report bugs via GitHub Issues
  • Examples: Sample workflows in /examples
  • Community: [Discord/Slack community link]

License

[License Type] - see LICENSE file for details.


Version 1.5.0 | Built with โค๏ธ for the Snowflake community

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

snowcli_tools-1.5.0.tar.gz (104.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

snowcli_tools-1.5.0-py3-none-any.whl (125.0 kB view details)

Uploaded Python 3

File details

Details for the file snowcli_tools-1.5.0.tar.gz.

File metadata

  • Download URL: snowcli_tools-1.5.0.tar.gz
  • Upload date:
  • Size: 104.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.15

File hashes

Hashes for snowcli_tools-1.5.0.tar.gz
Algorithm Hash digest
SHA256 44dc51de0b3ea0a58843d1c1be7de2cb79cc8cc5d2e2a4d4cb7dc3569cfa645b
MD5 e0060d5e7f649181bd7e44ded14a8f46
BLAKE2b-256 00ade481fa11655e4366935c1e596572476c8397d975a0d69a7d3d666c5665a0

See more details on using hashes here.

File details

Details for the file snowcli_tools-1.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for snowcli_tools-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 47fd80b1552a23f558563d4ffa7e8244adfcd6f7c1d76ec8c4f40d5c8661ff2f
MD5 8b48fa72fe5eff234c26e6ec0766da32
BLAKE2b-256 16a9cf255461d816ef74f27ee1945bd92987d12e7509aafcaa93a8a65322dfad

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page