Skip to content

Commit

Permalink
fix(dagster-snowflake): fix test_fetch_last_updated_timestamps_missin…
Browse files Browse the repository at this point in the history
…g_table (#25623)

## Summary & Motivation

This change fix the `test_fetch_last_updated_timestamps_missing_table`
function in the Snowflake resource tests.

Also fixes a small pyright issue in tableau tests

## How I Tested These Changes

- [ ] validate that the failing BK tests are now passing
  • Loading branch information
mlarose authored Oct 29, 2024
1 parent 66eb363 commit e5f525f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -317,19 +317,20 @@ def test_fetch_last_updated_timestamps_missing_table():
conn.cursor().execute(f"create table {table_name} (foo string)")
conn.cursor().execute(f"insert into {table_name} values ('bar')")

reversed_table_name = table_name[::-1]
with pytest.raises(ValueError):
freshness = fetch_last_updated_timestamps(
snowflake_connection=conn,
database="TESTDB",
# Second table does not exist, expects ValueError
tables=[table_name, reversed(table_name)],
tables=[table_name, reversed_table_name],
schema="TESTSCHEMA",
)

freshness = fetch_last_updated_timestamps(
snowflake_connection=conn,
database="TESTDB",
tables=[table_name, reversed(table_name)],
tables=[table_name, reversed_table_name],
schema="TESTSCHEMA",
ignore_missing_tables=True,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def test_translator_spec(
host_key: host_value,
}

resource = clazz(**resource_args) # type: ignore
resource = clazz(**resource_args)
resource.build_client()

all_assets = load_tableau_asset_specs(resource)
Expand Down

0 comments on commit e5f525f

Please sign in to comment.