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>
--workload-identity-provider <workload_identity_provider>
--private-key <private_key_file>
--token-file-path <token_file_path>
--default
--no-interactive
--format <format>
--verbose
--debug
--silent
--enhanced-exit-codes
引数¶
なし
オプション¶
--connection-name, -n TEXT新しい接続の名前。
-a, --account, --accountname TEXTSnowflakeで認証するときに使用するアカウント名。
-u, --user, --username TEXTSnowflakeに接続するユーザー名。
-p, --password TEXTSnowflakeのパスワード。
-r, --role, --rolename TEXTSnowflakeで使用するロール。
-w, --warehouse TEXTSnowflakeで使用するウェアハウス。
-d, --database, --dbname TEXTSnowflakeで使用するデータベース。
-s, --schema, --schemaname TEXTSnowflakeで使用するスキーマ。
-h, --host TEXTSnowflakeへの接続を試みるホスト名。
-P, --port INTEGERホスト上で通信するポート。
--region, -R TEXTデフォルトのSnowflakeデプロイメントでない場合はリージョン名。
-A, --authenticator TEXTパスワードベース以外の場合に選択された認証コード。
-W, --workload-identity-provider TEXTワークロードIDプロバイダーの型。
--private-key, -k, --private-key-file, --private-key-path TEXT秘密キーを含むファイルへのパス。
-t, --token-file-path TEXTSnowflake に接続する際に使用する OAuth トークンを含むファイルへのパス。
--default提供された場合、接続はデフォルト接続として設定されます。デフォルト: false。
--no-interactiveプロンプトを無効にします。デフォルト:False。
--format [TABLE|JSON|JSON_EXT|CSV]出力形式を指定します。デフォルト: 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
Wrote new connection my_conn to <user-home>/.snowflake/config.toml