Paramter Type while Executing Rest API of Execute a SQL statement POST /api/2.0/sql/statements/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2024 04:59 AM
Hi,
So previously I was using Old Preview Databricks API version. Now I have switched to v1 of the API which usage
Execute a SQL statement POST /api/2.0/sql/statements/
I wanted to know how to pass the parameter class when my value is list of string for Eg
OLD Method
SQL - Select * from Table where columnName in ({{someName}})
parameter - new ParametersList {Name = "someName", Value = someNameList, Type = "enum", MultiValuesOptions = new MultiValuesListParameter { Prefix = "", Suffix = "", Separator = "," }, EnumOptions = string.Join("\n", someNameList)}
Now I need to convert this in new Databricks API
SQL - Select * from Table where columnName in (:someName)
parameter - new ParametersList {Name = "someName", Value = someNameList, Type = "string")}
this new parameter structure I go from the official link here
Execute a SQL statement | Statement Execution API | REST API reference | Azure Databricks
Im not sure how to pass this parameter as the request is getting Bad request in response, I mainly wanted to know what to give Type when Value is a list