databricks-sql-python icon indicating copy to clipboard operation
databricks-sql-python copied to clipboard

Using sequence as parameters

Open freud14-tm opened this issue 2 years ago • 9 comments

I know that using sequence as parameters works using the legacy inline parameters. However, as mentioned there, it doesn't work with the native parameters. Is this somewhere on the roadmap to be implemented? If so, when?

freud14-tm avatar Nov 24 '23 21:11 freud14-tm

Is this somewhere on the roadmap to be implemented?

Yes. For this to work, Databricks runtime needs to support ARRAY type SQL parameters. That feature is being designed right now.

If so, when?

I don't have an ETA to share at this time. But I've passed this specific use-case to that team for consideration.

susodapop avatar Nov 29 '23 01:11 susodapop

Thank you very much @susodapop . Let me know of the development.

freud14-tm avatar Nov 29 '23 14:11 freud14-tm

From what I understand, the likely syntax for this construct in the future would be like this:

SELECT field FROM table WHERE field in (SELECT * FROM explode(:array_param))

...although it would be nice to have a better shorthand for this.

susodapop avatar Nov 29 '23 14:11 susodapop