Skip to content

Commit

Permalink
remove deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
JamieDeMaria committed Apr 11, 2023
1 parent 61d5f46 commit 1251aea
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 25 deletions.
5 changes: 0 additions & 5 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ RENAME COLUMN time_copy TO time

```

<Note>
The <code>time_data_to_string</code> configuration value will be deprecated in version X.Y.Z of the <code>dagster-snowflake</code> library. At that point, all timestamp data will be stored as TIMESTAMP_NTZ(9) type.
</Note>


## Migrating to 1.2.0

### Database migration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def io_manager_test_pipeline():

@pytest.mark.skipif(not IS_BUILDKITE, reason="Requires access to the BUILDKITE snowflake DB")
@pytest.mark.parametrize(
"io_manager", [(old_snowflake_io_manager), (pythonic_snowflake_io_manager)]
"io_manager", [(snowflake_pandas_io_manager), (SnowflakePandasIOManager.configure_at_launch())]
)
def test_io_manager_with_snowflake_pandas_timestamp_data(io_manager):
with temporary_snowflake_table(
Expand Down Expand Up @@ -258,6 +258,13 @@ def read_time_df(df: pandas.DataFrame):

@job(
resource_defs={"snowflake": io_manager},
config={
"resources": {
"snowflake": {
"config": {**SHARED_BUILDKITE_SNOWFLAKE_CONF, "database": DATABASE}
}
}
},
)
def io_manager_timestamp_test_job():
read_time_df(emit_time_df())
Expand All @@ -271,6 +278,8 @@ def io_manager_timestamp_test_job():
"resources": {
"snowflake": {
"config": {
**SHARED_BUILDKITE_SNOWFLAKE_CONF,
"database": DATABASE,
"store_timestamps_as_strings": True,
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
TablePartitionDimension,
TableSlice,
)
from dagster._utils.backcompat import deprecation_warning
from pydantic import Field
from sqlalchemy.exc import ProgrammingError

Expand Down Expand Up @@ -94,15 +93,6 @@ def my_table_a(my_table: pd.DataFrame) -> pd.DataFrame:

@io_manager(config_schema=SnowflakeIOManager.to_config_schema())
def snowflake_io_manager(init_context):
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",
(
"Convert existing tables to use timestamps and remove"
" store_timestamps_as_strings configuration instead."
),
)
return DbIOManager(
type_handlers=type_handlers,
db_client=SnowflakeDbClient(),
Expand Down Expand Up @@ -262,15 +252,6 @@ 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 1251aea

Please sign in to comment.