Skip to content

Commit 8018d7a

Browse files
authored
Chore: use engine_adapter.execute for statements in python model docs (#4754)
1 parent c88daec commit 8018d7a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

docs/concepts/models/python_models.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,15 +163,15 @@ def execute(
163163
) -> pd.DataFrame:
164164

165165
# pre-statement
166-
context.fetchdf("SET GLOBAL parameter = 'value';")
166+
context.engine_adapter.execute("SET GLOBAL parameter = 'value';")
167167

168168
# post-statement requires using `yield` instead of `return`
169169
yield pd.DataFrame([
170170
{"id": 1, "name": "name"}
171171
])
172172

173173
# post-statement
174-
context.fetchdf("CREATE INDEX idx ON example.pre_post_statements (id);")
174+
context.engine_adapter.execute("CREATE INDEX idx ON example.pre_post_statements (id);")
175175
```
176176

177177
## Optional on-virtual-update statements

0 commit comments

Comments
 (0)