databricks-sql-cli
databricks-sql-cli copied to clipboard
CLI for querying Databricks SQL
dbsqlcli does not correctly handle fields that contain a newline in csv table format. `SELECT '\n' AS col1;` This query does not output any quotes at all.
In order to upload a local file to a Volume (via PUT) and access the associated data (via read_files), it is necessary to pass set staging_allowed_local_path when initiating sql.connect() https://docs.databricks.com/en/dev-tools/python-sql-connector.html
If you try to execute a sql script that ends with a comment, the confirm_destructive_query method (prompt_utils.py) calls queries_start_with, and query_starts_with throws an exception "list index out of range". It...
It doesn't look like databricks-sql-cli supports passing [parameter markers](https://learn.microsoft.com/en-us/azure/databricks/sql/language-manual/sql-ref-parameter-marker), though the Databricks CLI supports them (example [here](https://docs.databricks.com/en/dev-tools/sql-execution-tutorial.html#step-1-execute-a-sql-statement-and-save-the-data-result-as-json)). Would you consider adding?
The following command works: `python -m dbsqlcli.main -e "SELECT COUNT(*) FROM my_schema.my_database.my_table"` I would expect the following command to work similarly, but it does not: `python -m dbsqlcli.main -e "SELECT...
Running the REPL using `dbsqlcli` or `dbsqlcli ` or `dbsqlcli --oauth` results in a `NO_SUCH_CATALOG_EXCEPTION` ``` [NO_SUCH_CATALOG_EXCEPTION] Catalog 'btda-dea' was not found. Please verify the catalog name and then retry...
I'm using Python 3.11 and I got an ImportError when I tried to run `dbsqlcli` after setting up my `dbsqlclirc` file The exact error was ```python File "/Users/dfasil/.pyenv/versions/3.11.10/lib/python3.11/site-packages/databricks/sql/utils.py", line 1,...