Skip to content

Commit

Permalink
Merge pull request #270 from droher/patch-1
Browse files Browse the repository at this point in the history
Fix cursor isolation on Python model
  • Loading branch information
jwills authored Oct 13, 2023
2 parents 4afdac4 + c312713 commit 1995663
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dbt/adapters/duckdb/environments/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ def run_python_job(
cur = cls.initialize_cursor(creds, con.cursor())
# Do the actual work to run the code here
dbt = module.dbtObj(load_df_function)
df = module.model(dbt, cur)
module.materialize(df, con)
df = module.model(dbt, con)
module.materialize(df, cur)
except Exception as err:
raise DbtRuntimeError(f"Python model failed:\n" f"{err}")
finally:
Expand Down

0 comments on commit 1995663

Please sign in to comment.