Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

snowflake-connections

БесплатноБез исполняемых скриптовНе проверен

Configuring Snowflake connections using connections.toml (for Snowflake CLI, Streamlit, Snowpark) or profiles.yml (for dbt) with multiple authentication…

sfc-gh-dflippoот sfc-gh-dflippo★ 35 звёзд на GitHub13 установок в других каталогах

Об этом скилле

Snowflake Connections

Configure and manage Snowflake connections for CLI tools, Streamlit apps, dbt, and Snowpark applications.

Configuration Files:

  • connections.toml - Used by Snowflake CLI, Streamlit, and Snowpark
  • profiles.yml - Used by dbt (different format, covered in dbt-core skill)

When to Use This Skill

Activate this skill when users ask about:

  • Setting up Snowflake connections for CLI, Streamlit, or Snowpark
  • Configuring connections.toml file
  • Authentication methods (SSO, key pair, username/password, OAuth)
  • Managing multiple environments (dev, staging, prod)
  • Overriding connection settings with environment variables
  • Troubleshooting authentication or connection issues
  • Rotating credentials or keys
  • Setting up CI/CD authentication

Note: For dbt-specific connection setup using profiles.yml, see the dbt-core skill. The concepts and authentication methods in this skill still apply, but dbt uses a different configuration file format.

Configuration File

This skill covers connections.toml used by Snowflake CLI, Streamlit, and Snowpark.

For dbt: Use ~/.dbt/profiles.yml instead. See the dbt-core skill for dbt configuration. The authentication methods described here apply to both files.

Location

OS Path
Unix/Mac ~/.snowflake/connections.toml
Windows %USERPROFILE%\.snowflake\connections.toml

Basic Structure

[default]
account = "your_account"
user = "your_username"
warehouse = "COMPUTE_WH"
database = "MY_DB"
schema = "PUBLIC"
role = "MY_ROLE"

# Add authentication method (see below)

Key Fields:

  • account - Snowflake account identifier (e.g., xy12345.us-east-1)
  • user - Snowflake username
  • warehouse - Default warehouse for queries
  • database - Default database context
  • schema - Default schema context
  • role - Default role to use

Authentication Methods

Option 1: SSO/External Browser (Recommended for Development)

Best for: Organizations with SSO, interactive development

[default]
account = "your_account"
user = "your_username"
authenticator = "externalbrowser"

How it works: Opens browser for SSO authentication

Pros:

  • ✅ Most secure for development
  • ✅ Leverages existing SSO infrastructure
  • ✅ No password storage required
  • ✅ MFA support built-in

Cons:

  • ❌ Requires browser access
  • ❌ Not suitable for headless/CI environments

Usage:

# Browser opens automatically for authentication
streamlit run app.py
snow sql -c default -q "SELECT CURRENT_USER()"

Option 2: Key Pair Authentication (Recommended for Production)

Best for: Production deployments, CI/CD pipelines, automation

[default]
account = "your_account"
user = "your_username"
authenticator = "snowflake_jwt"
private_key_path = "~/.ssh/snowflake_key.p8"
private_key_passphrase = "your_passphrase"  # Optional if key is encrypted

Setup Steps:

1. Generate Key Pair:

# Generate encrypted private key (recommended)
openssl genrsa 2048 | openssl pkcs8 -topk8 -inform PEM -out snowflake_key.p8

# Or unencrypted (less secure, but no passphrase needed)
openssl genrsa 2048 | openssl pkcs8 -topk8 -inform PEM -out snowflake_key.p8 -nocrypt

# Generate public key
openssl rsa -in snowflake_key.p8 -pubout -out snowflake_key.pub

2. Extract Public Key (remove header/footer/newlines):

# Remove header, footer, and newlines
cat snowflake_key.pub | grep -v "BEGIN PUBLIC" | grep -v "END PUBLIC" | tr -d '\n'

3. Add Public Key to Snowflake:

-- Set public key for user
ALTER USER your_username SET RSA_PUBLIC_KEY='MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A...';

-- Verify
DESC USER your_username;
-- Check RSA_PUBLIC_KEY_FP field is populated

4. Test Connection:

snow sql -c default -q "SELECT CURRENT_USER()"

Pros:

  • ✅ Very secure for production
  • ✅ No password storage
  • ✅ Ideal for CI/CD and automation
  • ✅ Works in headless environments
  • ✅ No interactive prompts

Cons:

  • ❌ More complex initial setup
  • ❌ Requires key management and rotation

Security Best Practices:

  • Store private keys outside project directory
  • Use encrypted keys with passphrases
  • Rotate keys every 90 days
  • Use different keys for different environments
  • Never commit keys to version control

Option 3: Username/Password (Development Only)

Best for: Quick testing, local development

[default]
account = "your_account"
user = "your_username"
password = "your_password"

Pros:

  • ✅ Simple setup
  • ✅ Works everywhere

Cons:

  • ❌ Less secure (password in plain text)
  • ❌ Not recommended for production
  • ❌ MFA requires separate handling

⚠️ WARNING: Never use for production or commit connections.toml with passwords to git!


Option 4: OAuth To

Полный SKILL.md на GitHub

Установить snowflake-connections в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл snowflake-connections?

Configuring Snowflake connections using connections.toml (for Snowflake CLI, Streamlit, Snowpark) or profiles.yml (for dbt) with multiple authentication methods (SSO, key pair, username/password, OAuth), managing multiple environments, and overriding settings with environment variables. Use this skill when setting up Snowflake CLI, Streamlit apps, dbt, or any tool requiring Snowflake authentication and connection management.

Как установить скилл snowflake-connections?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл snowflake-connections запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить snowflake-connections с