Skip to content

Commit adf3ec5

Browse files
committed
update callsql
1 parent 0f95efd commit adf3ec5

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

patchwork/steps/CallSQL/CallSQL.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,12 @@ def __build_engine(self, inputs: dict):
3434
dialect_plus_driver,
3535
**kwargs,
3636
)
37-
self.engine = create_engine(connection_url)
37+
38+
connect_args = None
39+
if inputs.get("db_driver_args") is not None:
40+
connect_args = inputs.get("db_driver_args")
41+
42+
self.engine = create_engine(connection_url, connect_args=connect_args)
3843
with self.engine.connect() as conn:
3944
conn.execute(text("SELECT 1"))
4045
return self.engine

patchwork/steps/CallSQL/typed.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ class CallSQLInputs(__RequiredCallSQLInputs, total=False):
1515
db_host: str
1616
db_port: int
1717
db_name: str
18+
db_params: dict[str, Any]
19+
db_driver_args: dict[str, Any]
1820
db_query_template_values: dict[str, Any]
1921

2022

0 commit comments

Comments
 (0)