feat: add DuckDB as a supported query engine (closes #40)#70
Merged
Conversation
Wire DuckDB into the engine factory (SQLAlchemy dialect via duckdb-engine, already a declared dependency). Add the frontend connection plugin and register it in the plugin list. Add an end-to-end integration test covering list_tables, execute_sql, and the full agent pipeline against a temp DuckDB file with Olist-like sample tables. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ngs UI - Add "duckdb" to the elif branch that renders connection fields so a configured DuckDB connection shows "connected" rather than "unconfigured" - File-based engines (sqlite, duckdb) only need database path to be considered configured; server engines still require host - Add "duckdb" to _KNOWN_TOOLS so the tool toggle panel renders correctly Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tatus helper Every engine type must be wired through several touchpoints — factory dispatch, secret_env_vars, _KNOWN_TOOLS, the status renderer, and the frontend plugin index. Forgetting any one of them silently degrades the UX (empty tool toggles, connections stuck as 'unconfigured', missing from the picker) without failing CI. The contract test enumerates every known engine type and asserts each touchpoint handles it. Adding a new connector means adding one entry to MINIMAL_CONFIGS — the rest of the wiring is then enforced. Extract _compute_engine_status as a small pure helper so the status check is unit-testable without DB setup. Use it everywhere list_connections computes a status (snowflake, bigquery, sqlalchemy-family, fallback). The new tests caught three pre-existing gaps: hive, postgresql, and sqlite were all missing from _KNOWN_TOOLS — their tool-toggles panel was empty in the Settings UI. Fixed all three. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SQLAlchemyQueryEnginedialect —duckdb-enginewas already a declared dependency, so no new packages neededduckdb.tsx) with a single "database file path" field, matching the sqlite patternChanges
engines/factory.py"duckdb"to_engine_cls()andget_secret_env_vars()plugins/duckdb.tsxconnections/index.tsduckdbPlugintest_duckdb_e2e.pyTest plan
test_engine_list_tables—list_tablesreturns all 3 tables from a temp DuckDB filetest_engine_execute_sql—execute_sqlreturns correct row counts (45 delivered, 5 canceled)test_top_categories_by_revenue— full agent pipeline: context lookup → SQL → ranked answer with charttest_delivered_vs_canceled_order_count— full agent pipeline: catalog fallback → SQL → correct counts🤖 Generated with Claude Code