Snowflake-Labs / schemachange

A Database Change Management tool for Snowflake
Apache License 2.0
482 stars 219 forks source link

Parameter snowflake-database is not overriding the default database value #142

Closed gs4gitlab closed 1 year ago

gs4gitlab commented 1 year ago

Hi Team,

There is global variable called "### _metadata_database_name = 'METADATA' " . Due to this the external environment parameter "SF_DATABASE" value is not able to overridden that results the snowflake connection failure with the given connection parameters when there is no default "METADATA" database in my snowflake account.

Kindly remove the global variable and allow the script to override with given parameter using SF_DATABASE"

sfc-gh-jhansen commented 1 year ago

Hi there @gs4gitlab, please check out the -c (or --change-history-table) command line argument or the change-history-table config file setting. That allows you to change where the change history table is located.

gs4gitlab commented 1 year ago

Thanks for the reply. It is working on local machine but not on through BitBucket. Below is the error. And there is no change in the Snowflake connection details.

conn = connection.create_connection(

File "/usr/local/lib/python3.9/site-packages/snowflake/connector/vendored/urllib3/util/connection.py", line 72, in create_connection for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): File "/usr/local/lib/python3.9/socket.py", line 954, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno -2] Name or service not known

Do you have any thoughts on this?

sfc-gh-jhansen commented 1 year ago

Hmm, I'm not sure. I haven't seen this particular issue but it sounds like a setup/configuration issue with your BitBucket pipeline.