cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
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
Valued Contributor
Valued Contributor

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! 

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.