Skip to content

Commit 3e603f8

Browse files
millintomasfarias
authored andcommitted
fix: apply converter to DbtConnectionParam.conn_extra_params
1 parent e554647 commit 3e603f8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

airflow_dbt_python/hooks/target.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ def get_dbt_details_from_connection(self, conn: Connection) -> dict[str, Any]:
250250
if isinstance(param, DbtConnectionParam):
251251
key = param.override_name
252252
value = getattr(conn, param.name, param.default)
253-
if param.converter:
253+
if value and param.converter:
254254
value = param.converter(value)
255255
elif isinstance(param, DbtConnectionConditionParam):
256256
key, default = param.resolve(conn)
@@ -273,6 +273,8 @@ def get_dbt_details_from_connection(self, conn: Connection) -> dict[str, Any]:
273273
if isinstance(param, DbtConnectionParam):
274274
key = param.override_name
275275
value = extra.get(param.name, param.default)
276+
if value and param.converter:
277+
value = param.converter(value)
276278
elif isinstance(param, DbtConnectionConditionParam):
277279
key, default = param.resolve(conn)
278280
value = extra.get(param.name, default)

0 commit comments

Comments
 (0)