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