Skip to content

Commit

Permalink
fix attr access
Browse files Browse the repository at this point in the history
  • Loading branch information
JamieDeMaria committed Apr 10, 2023
1 parent 63d1cb4 commit 2378f8a
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 2378f8a

Please sign in to comment.