Skip to content
This repository has been archived by the owner on Apr 8, 2024. It is now read-only.

Commit

Permalink
fix(dbt-fal): trino none credential handling (#673)
Browse files Browse the repository at this point in the history
  • Loading branch information
mederka authored Nov 18, 2022
1 parent d4b04b1 commit 4163d24
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions adapter/src/dbt/adapters/fal_experimental/support/trino.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Any, Dict, Optional
from typing import Any, Dict
from dbt.adapters.base import BaseAdapter, Credentials
from trino.sqlalchemy import URL
from dbt.adapters.trino.connections import TrinoCredentials, TrinoNoneCredentials
from dbt.adapters.trino.connections import TrinoCredentials
import sqlalchemy

def create_engine(adapter: BaseAdapter) -> Any:
Expand All @@ -17,10 +17,7 @@ def create_engine(adapter: BaseAdapter) -> Any:
)
return sqlalchemy.create_engine(url, connect_args=connect_args)

def _build_connect_args(credentials: TrinoCredentials) -> Optional[Dict[str, Any]]:
if isinstance(credentials, TrinoNoneCredentials):
return

def _build_connect_args(credentials: TrinoCredentials) -> Dict[str, Any]:
# See:
# https://github.com/starburstdata/dbt-trino/blob/master/dbt/adapters/trino/connections.py
return {
Expand Down

0 comments on commit 4163d24

Please sign in to comment.