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

Multiple statements can't be executed in single network call

Open tushartg opened this issue 9 months ago • 1 comments

I can't execute two queries which are ; separated. Is it possible to add this feature so that network latency doesn't add up in multiple query executions.

query

CREATE TABLE IF NOT EXISTS tanmay.default.test_multiquery_insert (
	c_int int,
	c_str string
);
INSERT INTO tanmay.default.test_multiquery_insert (c_int, c_str) VALUES (1, 'test');
INSERT INTO tanmay.default.test_multiquery_insert (c_int, c_str) VALUES (2, 'test2');

Response \n[PARSE_SYNTAX_ERROR] Syntax error at or near 'INSERT': extra input 'INSERT'. SQLSTATE: 42601 (line 6, pos 1)\n\n== SQL ==\n\n\tCREATE TABLE IF NOT EXISTS tanmay.default.test_multiquery_insert (\n\t\tc_int int,\n\t\tc_str string\n\t);\n\tINSERT INTO tanmay.default.test_multiquery_insert (c_int, c_str) VALUES (1, 'test');\n-^^^\n\tINSERT INTO tanmay.default.test_multiquery_insert (c_int, c_str) VALUES (2, 'test2');\n\t\n

tushartg avatar Jun 04 '25 06:06 tushartg

This would require server side support and is not something the driver can fix.

jprakash-db avatar Jun 05 '25 06:06 jprakash-db