DuckDB Tool

The DuckDB Tool allows DinoAI to explore your DuckDB instance β€” listing schemas, tables, and columns β€” so you can query and understand your analytical data directly from the Code IDE without switching contexts.

This tool connects DinoAI to your DuckDB database, enabling it to navigate your data structure, identify available tables, and surface column-level details to inform the SQL and dbt models you're building.

circle-info

Requires a DuckDB connection. Before using this tool, make sure your DuckDB instance is accessible from your Paradime workspace.

Capabilities

The DuckDB Tool exposes three underlying operations:

list_all_duckdb_schemas lists all schemas in your DuckDB database, excluding system schemas (information_schema and pg_catalog). Use this to get an overview of the available namespaces in your instance before drilling down into specific tables.

list_all_tables_in_duckdb_schema lists all tables and views within a given schema. Results include the table name and type, giving you a complete inventory of what's available in each namespace.

list_all_columns_in_duckdb_table fetches full column-level details for a specific table β€” including column names, data types, and ordinal positions. Use this when you need to understand a table's structure before writing SQL or defining dbt sources.

Using the DuckDB Tool

  1. Open DinoAI in the right panel of the Code IDE

  2. Describe what you want to explore β€” a schema, a table, or a specific column

  3. Grant permission when DinoAI asks to access your DuckDB instance

  4. Review the results DinoAI surfaces and incorporate them into your workflow

Example Use Cases

Exploring Available Schemas

Prompt

Result: DinoAI lists all non-system schemas in your DuckDB database, giving you an at-a-glance overview of your data namespaces so you can decide where to look next.


Discovering Tables in a Schema

Prompt

Result: DinoAI queries the analytics schema and returns a list of all tables and views with their types, so you can identify the right table for your query or model.


Understanding a Table's Structure

Prompt

Result: DinoAI fetches the full column list for analytics.orders, including data types and positions, giving you the schema context to write accurate SQL or define a dbt source without leaving the IDE.

Working with Other Tools

The DuckDB Tool works well alongside DinoAI's other capabilities to support your full development workflow:

  • Combine with the Terminal Tool to run dbt commands or SQL queries against the tables DinoAI discovers

  • Use alongside the Data Warehouse Tools for cross-warehouse exploration when your stack includes both DuckDB and a cloud warehouse

  • Pair with Git Lite to commit generated models and source definitions after exploring your DuckDB structure

Best Practices

Start broad, then drill down β€” Use list_all_duckdb_schemas first to orient yourself, then move to tables and columns. This keeps DinoAI's context focused and responses accurate.

Provide exact schema and table names β€” If you already know the schema, include it in your prompt. This avoids unnecessary round-trips and keeps the conversation efficient.

Verify column types before writing SQL β€” Always check data types when writing transformations, especially for date, timestamp, or JSON columns, which behave differently across DuckDB versions.

Use results to define dbt sources β€” Column-level output from DinoAI can be directly incorporated into schema.yml source definitions, saving manual lookup time.

Last updated

Was this helpful?