Skip to content

Commit

Permalink
Fix cursor isolation on Python model
Browse files Browse the repository at this point in the history
  • Loading branch information
droher authored Oct 13, 2023
1 parent 4afdac4 commit c312713
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 c312713

Please sign in to comment.