koji_kawamura
Databricks Employee
Databricks Employee

Hi @lprevost 

The WorkspaceClient provides APIs to manage Query objects. But it doesn't provide the API to run it. If you need to run the query from a notebook, you can pass the query text into `spark.sql`. It returns SparkDataFrame. I hope this helps!

 

query = w.queries.get("query-uuid")
df = spark.sql(query.query_text, {"param_name": "param_value"})
display(df)