Skip to content

Commit

Permalink
Fix return value of snowflake get_table_names (#564)
Browse files Browse the repository at this point in the history
* Fix return value of snowflake get_table_names

---------

Co-authored-by: T Pham <[email protected]>
  • Loading branch information
sfc-gh-jvasquezrojas and TrangPham authored Jan 6, 2025
1 parent 115da35 commit d84484e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions DESCRIPTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Source code is also available at:
<https://github.com/snowflakedb/snowflake-sqlalchemy>

# Release Notes
- (Unreleased)
- Fix return value of snowflake get_table_names

- v1.7.2(December 18, 2024)
- Fix quoting of `_` as column name
Expand Down
2 changes: 1 addition & 1 deletion src/snowflake/sqlalchemy/snowdialect.py
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,7 @@ def get_table_names(self, connection, schema=None, **kw):
ret = self._get_schema_tables_info(
connection, schema, info_cache=kw.get("info_cache", None)
).keys()
return ret
return list(ret)

@reflection.cache
def get_view_names(self, connection, schema=None, **kw):
Expand Down
1 change: 1 addition & 0 deletions tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,7 @@ def test_inspect_column(engine_testaccount):
try:
inspector = inspect(engine_testaccount)
all_table_names = inspector.get_table_names()
assert isinstance(all_table_names, list)
assert "users" in all_table_names
assert "addresses" in all_table_names

Expand Down

0 comments on commit d84484e

Please sign in to comment.