Running multiple Databricks queries with golang client
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2023 08:49 AM
I am using github.com/databricks/databricks-sql-go to connect and run queries on my Databricks warehouse. However when I try to run multiple queries:
insert into....;
insert into....;
It fails and complains on syntax errors.
[PARSE_SYNTAX_ERROR] Syntax error at or near 'INSERT'...
Is there a config to enable running multiple queries like that. Example of how Snowflake are doing it: https://github.com/snowflakedb/gosnowflake/blob/master/multistatement_test.go
- Labels:
-
Golang
-
Multiple Queries
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2023 02:38 PM
Hi @Gil Omer This will be supported in the future, it depends on the SQL execution API allowing for multiple SQL statements.
if you want this today, you’d have to do semi-colon splitting and then you could execute a list of SQL queries. You can’t (yet) give us the multiple queries in a string with semi-colons.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2023 12:22 AM
Hi @Gil Omer
Thank you for posting your question in our community! We are happy to assist you.
To help us provide you with the most accurate information, could you please take a moment to review the responses and select the one that best answers your question?
This will also help other community members who may have similar questions in the future. Thank you for your participation and let us know if you need any further assistance!

