Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SNOW-1473500: Ability to interpolate variables within config.toml #1971

Open
kameshsampath opened this issue Jun 11, 2024 · 3 comments
Open
Assignees
Labels
enhancement The issue is a request for improvement or a new feature feature status-triage_done Initial triage done, will be further handled by the driver team

Comments

@kameshsampath
Copy link

What is the current behavior?

Description

When the snow cli creates the config.toml it does not interpolate the variables within the attribute values except for ~.

e.g.

default_connection_name="cheatsheets"

[connections]
[connections.cheatsheets]
account = "account-id"
user = "kameshs"
warehouse = "COMPUTE_WH"
schema = "PUBLIC"
authenticator = "SNOWFLAKE_JWT"
private_key_path="$KEYS_DIR/.keys/rsa_key.p8"

The $KEYS_DIR never gets interpolated while reading the key path.

It will be nice to add variable interpolation support for all attribute values with in the config.toml.

Context

No response

What is the desired behavior?

Expecting the parsing on config.toml expands the variables as needed.

How would this improve snowflake-connector-python?

It will improve the DevX and helps in automation where the automation tools can define their set of ENV variables to be used.

References and other background

No response

@github-actions github-actions bot changed the title Ability to interpolate variables within config.toml SNOW-1473500: Ability to interpolate variables within config.toml Jun 11, 2024
@sfc-gh-sghosh sfc-gh-sghosh self-assigned this Jun 12, 2024
@sfc-gh-sghosh
Copy link

Hello @kameshsampath ,

Thanks for raising the issue; we are checking and will update you.

Regards,
Sujan

@sfc-gh-sghosh sfc-gh-sghosh added status-in_progress Issue is worked on by the driver team status-triage Issue is under initial triage and removed needs triage status-in_progress Issue is worked on by the driver team labels Jun 12, 2024
@sfc-gh-sghosh
Copy link

Hello @kameshsampath ,

Yes, At present SnowflakeCLI config.toml is not recognizing variables. Will update if there is any plan to support it.
At present you have to use the directory ( KEYS_DIR) from the current user directory only

Example
authenticator = "SNOWFLAKE_JWT"
private_key_path="KEYS_DIR/rsa_key.p8"

Regards,
Sujan

@sfc-gh-sghosh sfc-gh-sghosh added status-triage_done Initial triage done, will be further handled by the driver team and removed status-triage Issue is under initial triage labels Jun 18, 2024
@sfc-gh-sghosh
Copy link

Hello @kameshsampath ,

At present, SnowflakeCLI config. tool doesn't support variables, so it will be taken as a feature request.

Regards,
Sujan

@sfc-gh-sghosh sfc-gh-sghosh added the enhancement The issue is a request for improvement or a new feature label Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement The issue is a request for improvement or a new feature feature status-triage_done Initial triage done, will be further handled by the driver team
Projects
None yet
Development

No branches or pull requests

3 participants