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

Does schemachange not support environment variables for connection configurations anymore? #311

Open
jdglaser opened this issue Jan 9, 2025 · 1 comment
Labels
question Further information is requested Workaround Issues that can be addressed via a workaround

Comments

@jdglaser
Copy link

jdglaser commented Jan 9, 2025

I understand that the schemachange-config.yml file method of setting up connections is being deprecated in favor of using the connections.toml file, but I am not seeing a way to use environment variables for connection parameters.

We use schemachange within CI/CD pipelines. Beyond it just generally being bad practice, we can't very well hardcode secrets like passwords in the connections.toml file to be committed in source control. The Snowflake CLI allows setting environment variable values at the global or connection level to set parameters on connections, but this uses the Python connector.

Hopefully this is just an oversight and not intended or I'm just missing something here, because I'm not sure how this could be seen as a useable tool without the ability to set sensitive or dynamic connection information using environment variables.

Thanks!

@jdglaser jdglaser added question Further information is requested Workaround Issues that can be addressed via a workaround labels Jan 9, 2025
@zanebclark
Copy link

@jdglaser , I struggled with this when bringing schemachange's own integration tests up to date with the change. Right now, we're creating a connections.toml file in the CI/CD using the populateConnection.sh script. I'm not sure that this will be a viable approach across the board, but it's a workaround for today.

@sfc-gh-tmathew @sfc-gh-twhite @sfc-gh-jhansen, to @jdglaser 's point, I couldn't find any documentation on the Snowflake Python connector supporting connection-related environment variables. I see a reference to environment variables here:

You can get login information from environment variables, the command line, a configuration file, or another appropriate source.

I think it is talking about feeding parameters into the connection when using the library directly. It doesn't look like the connector will reference environment variables automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested Workaround Issues that can be addressed via a workaround
Projects
None yet
Development

No branches or pull requests

2 participants