Skip to content

Commit

Permalink
revert changes to authentication creation for in mem secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
sh-rp committed Nov 3, 2024
1 parent 705804b commit 6286980
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions dlt/destinations/impl/filesystem/sql_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ def __init__(
self.memory_db = duckdb.connect(":memory:")
credentials = DuckDbCredentials(self.memory_db)

# remember wether we have set the non_persistent_authentication_created
self.non_persistent_authentication_created = False

super().__init__(
dataset_name=dataset_name or fs_client.dataset_name,
staging_dataset_name=None,
Expand Down Expand Up @@ -189,6 +186,7 @@ def open_connection(self) -> duckdb.DuckDBPyConnection:
if not self.has_dataset():
self.create_dataset()
self._conn.sql(f"USE {self.fully_qualified_dataset_name()}")
self.create_authentication()

return self._conn

Expand Down Expand Up @@ -270,10 +268,6 @@ def create_views_for_tables(self, tables: Dict[str, str]) -> None:
@contextmanager
@raise_database_error
def execute_query(self, query: AnyStr, *args: Any, **kwargs: Any) -> Iterator[DBApiCursor]:
if not self.non_persistent_authentication_created:
# create authentication to data provider
self.create_authentication()
self.non_persistent_authentication_created = True

# skip parametrized queries, we could also render them but currently user is not able to
# do parametrized queries via dataset interface
Expand Down

0 comments on commit 6286980

Please sign in to comment.