Skip to content

SNOW-3000366: snow connection generate-jwt ignores --temporary-connection parameter #2733

@mrebiai

Description

@mrebiai

SnowCLI version

3.14.0

Python version

3.12.3

Platform

Linux-6.14.0-37-generic-x86_64-with-glibc2.39

What happened

I would like to generate a Snowflake JWT

  • with snowflake-cli
  • without any config.toml

So I try to use this command line :

PRIVATE_KEY_PASSPHRASE=xxx snow connection generate-jwt --temporary-connection --authenticator SNOWFLAKE_JWT --account xxx.west-europe.azure --user MY_USER --private-key-file my-private-key.pem

But I have got this error message :

Connection None is not configured

The parameter --temporary-connection seems to be ignored by snow connection generate-jwt.
https://docs.snowflake.com/en/developer-guide/snowflake-cli/connecting/configure-connections#use-a-temporary-connection.

It works with snow sql :

PRIVATE_KEY_PASSPHRASE=xxx snow sql -q "select 42 as FOO;" --temporary-connection --format JSON --authenticator SNOWFLAKE_JWT --account xxx.west-europe.azure --user MY_USER --role MY_ROLE --warehouse MY_WH --database MY_DB --schema MY_SCHEMA --private-key-file my-private-key.pem

Result

[
    {
        "FOO": 42
    }
]

Console output

Connection None is not configured

How to reproduce

PRIVATE_KEY_PASSPHRASE=xxx snow connection generate-jwt --temporary-connection --authenticator SNOWFLAKE_JWT --account xxx.west-europe.azure --user MY_USER --private-key-file my-private-key.pem

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions