Databricks SDK for Python: Errors with parameters for Statement Execution

Phuonganh
Databricks Partner

Hi team,

Im using Databricks SDK for python to run SQL queries. I created a variable as below:

param = [{'name' : 'a', 'value' :x'}, {'name' : 'b', 'value' : 'y'}]

and passed it the statement as below

_ = w.statement_execution.execute_statement( warehouse_id = "123", catalog = "aaa", statement = "SELECT * FROM table_a WHERE name = :a and age = :b", parameters = param)

and I get an attribute error: 'dict' object has no attribute 'as_dict'

But this is exactly how databricks instructed on their website. Thank you for your help