diff --git a/python_modules/libraries/dagster-snowflake/dagster_snowflake/snowflake_io_manager.py b/python_modules/libraries/dagster-snowflake/dagster_snowflake/snowflake_io_manager.py index eb48edce94adb..b76654dc7fb00 100644 --- a/python_modules/libraries/dagster-snowflake/dagster_snowflake/snowflake_io_manager.py +++ b/python_modules/libraries/dagster-snowflake/dagster_snowflake/snowflake_io_manager.py @@ -95,7 +95,7 @@ def my_table_a(my_table: pd.DataFrame) -> pd.DataFrame: @io_manager(config_schema=infer_schema_from_config_class(SnowflakeIOManager)) def snowflake_io_manager(init_context): - if init_context.resource_config["store_timestamps_as_strings"]: + if init_context.resource_config.get("store_timestamps_as_strings", False): deprecation_warning( "Snowflake I/O manager config store_timestamps_as_strings", "2.0.0", @@ -263,6 +263,15 @@ def default_load_type() -> Optional[Type]: return None def create_io_manager(self, context) -> DbIOManager: + if self.store_timestamps_as_strings: + deprecation_warning( + "Snowflake I/O manager config store_timestamps_as_strings", + "2.0.0", + ( + "Convert existing tables to use timestamps and remove" + " store_timestamps_as_strings configuration instead." + ), + ) return DbIOManager( db_client=SnowflakeDbClient(), io_manager_name="SnowflakeIOManager",