cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Running multiple Databricks queries with golang client

gilo12
New Contributor III

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

2 REPLIES 2

Priyanka_Biswas
Databricks Employee
Databricks Employee

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.

Anonymous
Not applicable

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! 

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group