Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: improve error messages for wrong adapter #407

Merged
merged 2 commits into from
Jan 11, 2024

Conversation

tconbeer
Copy link
Owner

@tconbeer tconbeer commented Jan 11, 2024

closes #401

now shows this:

╭─ DuckDB couldn't connect to your database. ──────────────────────────────────────────────────────────────────────────╮
│ DuckDB raised the following error when trying to open one or more database files:                                    │
│ ---                                                                                                                  │
│ IO Error: Extension "/home/tco/.duckdb/extensions/v0.8.1/linux_amd64_gcc4/sqlite_scanner.duckdb_extension" not       │
│ found.                                                                                                               │
│ Extension "sqlite" is an existing extension.                                                                         │
│                                                                                                                      │
│ Install it first using "INSTALL sqlite".                                                                             │
│ ---                                                                                                                  │
│                                                                                                                      │
│ Did you mean to use Harlequin's sqlite adapter instead? Maybe try:                                                   │
│ harlequin -a sqlite small.sqlite noahs.sqlite                                                                        │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

or this:

╭─ SQLite couldn't connect to your database. ──────────────────────────────────────────────────╮
│ sqlite raised the following error when trying to open file:///home/tco/open/harlequin/f1.db: │
│ ---                                                                                          │
│ file is not a database                                                                       │
│ ---                                                                                          │
│                                                                                              │
│ Did you mean to use Harlequin's DuckDB adapter instead? Maybe try:                           │
│ harlequin -a duckdb f1.db                                                                    │
│ or:                                                                                          │
│ harlequin -P None f1.db                                                                      │
╰──────────────────────────────────────────────────────────────────────────────────────────────╯

@tconbeer tconbeer merged commit e9cce66 into main Jan 11, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve error message when opening a .sqlite db with duckdb
1 participant