Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Load cache_column_metadata from query
Browse files Browse the repository at this point in the history
saulbein committed Sep 19, 2023

Verified

This commit was signed with the committer’s verified signature.
saulbein Saulius Beinorius
1 parent 300cc19 commit d0847ea
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/snowflake/sqlalchemy/snowdialect.py
Original file line number Diff line number Diff line change
@@ -227,12 +227,13 @@ def create_connect_args(self, url: URL):
opts["port"] = "443"
opts["autocommit"] = False # autocommit is disabled by default

cache_column_metadata = opts.pop("cache_column_metadata", None)
query = dict(**url.query) # make mutable
cache_column_metadata = query.pop("cache_column_metadata", None)
self._cache_column_metadata = (
parse_url_boolean(cache_column_metadata) if cache_column_metadata else False
)

for name, value in url.query.items():
for name, value in query.items():
(_, expected_type) = DEFAULT_CONFIGURATION[name]
if not isinstance(expected_type, tuple):
expected_type = (expected_type,)

0 comments on commit d0847ea

Please sign in to comment.