diff --git a/schemachange/config/DeployConfig.py b/schemachange/config/DeployConfig.py index ba5d900..3cffeaf 100644 --- a/schemachange/config/DeployConfig.py +++ b/schemachange/config/DeployConfig.py @@ -168,6 +168,4 @@ def get_session_kwargs(self) -> dict: "autocommit": self.autocommit, "query_tag": self.query_tag, } - print("get_session_kwargs") - print(session_kwargs) return {k: v for k, v in session_kwargs.items() if v is not None} diff --git a/schemachange/config/get_merged_config.py b/schemachange/config/get_merged_config.py index 17f0831..dbd8367 100644 --- a/schemachange/config/get_merged_config.py +++ b/schemachange/config/get_merged_config.py @@ -42,12 +42,12 @@ def get_merged_config( logger: structlog.BoundLogger, ) -> Union[DeployConfig, RenderConfig]: env_kwargs: dict[str, str] = get_env_kwargs() - logger.info("env_kwargs", **env_kwargs) + logger.debug("env_kwargs", **env_kwargs) connection_name = env_kwargs.pop("connection_name", None) cli_kwargs = parse_cli_args(sys.argv[1:]) - logger.info("cli_kwargs", **cli_kwargs) + logger.debug("cli_kwargs", **cli_kwargs) cli_config_vars = cli_kwargs.pop("config_vars") @@ -65,7 +65,7 @@ def get_merged_config( yaml_kwargs = get_yaml_config_kwargs( config_file_path=config_file_path, ) - logger.info("yaml_kwargs", **yaml_kwargs) + logger.debug("yaml_kwargs", **yaml_kwargs) yaml_config_vars = yaml_kwargs.pop("config_vars", None) if yaml_config_vars is None: @@ -86,7 +86,7 @@ def get_merged_config( connections_file_path=connections_file_path, connection_name=connection_name, ) - logger.info("connection_kwargs", **connection_kwargs) + logger.debug("connection_kwargs", **connection_kwargs) config_vars = { **yaml_config_vars, @@ -107,7 +107,7 @@ def get_merged_config( if connection_name is not None: kwargs["connection_name"] = connection_name - logger.info("final kwargs", **kwargs) + logger.debug("final kwargs", **kwargs) if cli_kwargs["subcommand"] == "deploy": return DeployConfig.factory(**kwargs) diff --git a/schemachange/session/SnowflakeSession.py b/schemachange/session/SnowflakeSession.py index 1c3bd96..06e8e2c 100644 --- a/schemachange/session/SnowflakeSession.py +++ b/schemachange/session/SnowflakeSession.py @@ -62,8 +62,8 @@ def __init__( connect_kwargs = { "account": self.account, "user": self.user, - "database": kwargs.get("database"), - "schema": kwargs.get("schema"), + "database": self.database, + "schema": self.schema, "role": self.role, "warehouse": self.warehouse, "private_key_file": kwargs.get("private_key_path"), @@ -75,7 +75,7 @@ def __init__( "application": application, "session_parameters": self.session_parameters, } - self.logger.info("snowflake.connector.connect kwargs", **connect_kwargs) + self.logger.debug("snowflake.connector.connect kwargs", **connect_kwargs) self.con = snowflake.connector.connect(**connect_kwargs) print(f"Current session ID: {self.con.session_id}")