You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When attempting to run multiple consecutive SQL commands delimited with a semicolon between commands (eg. SELECT * FROM table1; SELECT * FROM table2;) SQL Tools raises a PARSE_SYNTAX ERROR.
If you run commands line by line (eg. highlight line 1, select Command + e, highlight line 2, select Command + e, etc) the commands execute successfully.
SQL Console Output:
[PARSE_SYNTAX_ERROR] Syntax error at or near 'use': extra input 'use'.(line 2, pos 0)
To Reproduce
Steps to reproduce the behavior:
Goto SQL Tools
Connect to Database
Create new SQL file
Enter multiple valid SQL commands delimited by valid ANSI SQL statement terminator (ie. Semicolon)
Expected behavior
Consecutive valid commands should execute successfully. User shouldn't need to separate commands into multiple SQL files or highlight line by line and execute each validly terminated command manually.
Desktop (please complete the following information):
After digging into databricks a little more it looks like the parse error is occurring on their side and being returned to you. Somehow the same commands issued through their web UI work fine. They must be parsing themselves through the UI and issuing commands one by one.
Results when running via PyCharm Database Tool - Success
Databricks Logs - most recent error is when running via VSCode SQLTools Extension. Subsequent successful queries were run from PyCharm in one multi statement batch.
Describe the bug
When attempting to run multiple consecutive SQL commands delimited with a semicolon between commands (eg. SELECT * FROM table1; SELECT * FROM table2;) SQL Tools raises a PARSE_SYNTAX ERROR.
If you run commands line by line (eg. highlight line 1, select Command + e, highlight line 2, select Command + e, etc) the commands execute successfully.
SQL Console Output:
[PARSE_SYNTAX_ERROR] Syntax error at or near 'use': extra input 'use'.(line 2, pos 0)
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Consecutive valid commands should execute successfully. User shouldn't need to separate commands into multiple SQL files or highlight line by line and execute each validly terminated command manually.
Desktop (please complete the following information):
SQLTools Version v0.28.1
VS Code Version:
Version: 1.85.1
Commit: 0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2
Date: 2023-12-13T09:48:16.874Z
Electron: 25.9.7
ElectronBuildId: 25551756
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Darwin arm64 23.1.0
OS:Mac
Databricks Driver for SQLTools v 0.4.2
Database version: Databricks SQL
== SQL ==
use catalog samples;
use database nyctaxi;
select * from trips LIMIT 10;
The text was updated successfully, but these errors were encountered: