snow connection add

構成ファイルに接続を追加します。

構文

snow connection add
  --connection-name <connection_name>
  --account <account>
  --user <user>
  --password <password>
  --role <role>
  --warehouse <warehouse>
  --database <database>
  --schema <schema>
  --host <host>
  --port <port>
  --region <region>
  --authenticator <authenticator>
  --private-key <private_key_file>
  --token-file-path <token_file_path>
  --default
  --no-interactive
  --format <format>
  --verbose
  --debug
  --silent
  --enhanced-exit-codes
Copy

引数

なし

オプション

--connection-name, -n TEXT

新しい接続の名前。

-a, --account, --accountname TEXT

Snowflakeで認証するときに使用するアカウント名。

-u, --user, --username TEXT

Snowflakeに接続するユーザー名。

-p, --password TEXT

Snowflakeのパスワード。

-r, --role, --rolename TEXT

Snowflakeで使用するロール。

-w, --warehouse TEXT

Snowflakeで使用するウェアハウス。

-d, --database, --dbname TEXT

Snowflakeで使用するデータベース。

-s, --schema, --schemaname TEXT

Snowflakeで使用するスキーマ。

-h, --host TEXT

Snowflakeへの接続を試みるホスト名。

-P, --port INTEGER

ホスト上で通信するポート。

--region, -R TEXT

デフォルトのSnowflakeデプロイメントでない場合はリージョン名。

-A, --authenticator TEXT

パスワードベース以外の場合に選択された認証コード。

--private-key, -k, --private-key-file, --private-key-path TEXT

秘密キーを含むファイルへのパス。

-t, --token-file-path TEXT

Snowflake に接続する際に使用する OAuth トークンを含むファイルへのパス。

--default

提供された場合、接続はデフォルト接続として設定されます。デフォルト: false。

--no-interactive

プロンプトを無効にします。デフォルト: False。

--format [TABLE|JSON]

出力形式を指定します。デフォルト: TABLE

--verbose, -v

ログレベル info 以上のログエントリを表示します。デフォルト: false。

--debug

ログレベル debug 以上のログ エントリを表示します。デバッグログには追加情報が含まれます。デフォルト: false。

--silent

コンソールへの中間出力をオフにします。デフォルト: false。

--enhanced-exit-codes

終了エラーコードをエラーのタイプによって区別します。デフォルト: false。

--help

このコマンドのヘルプテキストを表示します。

使用上の注意

snow connection add コマンドは、デフォルトの config.toml ファイルに接続を追加します。詳細については、 Snowflake CLI の構成とSnowflake への接続 をご参照ください。

接続を追加するには、次を実行します。

snow connection add
Enter connection name: <connection_name>
Enter account: <account>
Enter user: <user-name>
Enter password: <password>
Enter role: <role-name>
Enter warehouse: <warehouse-name>
Enter database: <database-name>
Enter schema: <schema-name>
Enter host: <host-name>
Enter port: <port-number>
Enter region: <region-name>
Enter authenticator: <authentication-method>
Enter private key file: <path-to-private-key-file>
Enter token file path: <path-to-mfa-token>
Do you want to configure key pair authentication? [y/N]: y
Key length [2048]: <key-length>
Output path [~/.ssh]: <path-to-output-file>
Private key passphrase: <key-description>
Wrote new connection <connection-name> to config.toml
Copy
Wrote new connection my_conn to <user-home>/.snowflake/config.toml