04 Jul, 2024 - About 2 minutes
Harlequin
Intro
Harlequin is a SQL IDE for DuckDB, SQLite, and other databases that runs in your Terminal
How
Harlequin is written in Python, using the Textual framework.
Harlequin is free and open-source software, licensed to you under the MIT License. You can find the source on GitHub.
Install
After installing Python 3.8 or above, install Harlequin using pip or pipx with:
pipx install harlequin |
You may want to install Harlequin with one or more extras, which provide additional features like additional database support or remote file viewing. That would look like this:
pipx install harlequin[postgres,s3] |
Check the official documentation to assess the available extensions: https://harlequin.sh/docs/duckdb/extensions
Loading some examples
Let’s clone the examples provided by superset as an example
git clone git@github.com:apache-superset/examples-data.git |
Loading data
harlequin "local.duckdb" |
Using with MotherDuck
harlequin "local.duckdb" "md:" |
-- Sample query. For more, see docs over at |
Conclusion
Harlequin is a terminal tool created by Ted Conbeer in 2023, designed to facilitate efficient SQL execution across multiple engines. Written in Python, this tool allows users to load files and explore data rapidly. Key features include auto-complete functionality, quick listing of both local and S3 files, and the ability to create tables and perform SQL-based exploration directly from the terminal.