/sql-database-pipeline:find-sql-database-source [database-url-or-description] [destination]from sql-database-pipeline
Discovers SQL database tables and scaffolds a dlt pipeline for loading data from PostgreSQL, MySQL, MSSQL, Oracle, SQLite, or any SQLAlchemy-supported database.
Ships in sql-database-pipeline. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Identify the database, explore available tables, and choose what to load.
Parse $ARGUMENTS:
database (required): description or connection URL of the source database (e.g. "postgres on localhost", "Rfam MySQL at rfam.org", a connection string, or just the DB type)destination (optional, default duckdb): where to load dataBefore running any steps, check whether the pipeline already exists in this session:
Arriving from dlthub-platform (e.g. the user was deploying and needs to fix the pipeline first) — pipeline name, destination, and loaded tables are already known. Skip this skill entirely and go directly to the relevant fix skill:
debug-sql-database-pipelinevalidate-sql-database-data; removing limits or adding incremental loading → adjust-tableadd-tableArriving mid-session with a pipeline already scaffolded — if a *_pipeline.py file exists and the user just wants to extend or fix it, skip steps 1–4 and go straight to step 5 to confirm tables and destination.
Only run the full discovery flow (steps 1–6) when starting fresh with no existing pipeline.
Map the user's description to a SQLAlchemy dialect + driver:
| Database | drivername | extra package |
|---|---|---|
| PostgreSQL | postgresql+psycopg2 | psycopg2-binary |
| MySQL / MariaDB | mysql+pymysql | pymysql |
| MS SQL Server | mssql+pyodbc | pyodbc |
| Oracle | oracle+cx_oracle | cx_Oracle |
| SQLite | sqlite | (built-in) |
If unclear, ask the user which database engine they are using.
Before assuming sql_database is the right tool, check what the user actually needs:
STOP and hand off if the use case matches a specialised verified source:
| User intent | Source | Docs |
|---|---|---|
| Postgres CDC (change data capture) / logical replication | pg_replication (verified, free) | https://dlthub.com/docs/dlt-ecosystem/verified-sources/pg_replication.md |
| MS SQL Server / Change Tracking, managed or hosted, need advanced features | ms_sql (hub) | https://dlthub.com/docs/hub/ingestion/ms-sql.md |
| add more as discovered: check dlthub and verified sources |
Note: Sources from the dlthub require the
hubextra:uv add "dlt[hub]".
Tell the user which source fits and the install/init command. Do not continue with sql_database for these cases — the wrong source will produce incorrect or incomplete results.
Also search the dlthub for the specific database type — community and ecosystem sources are not listed by dlthub pipeline init --list-sources:
https://dlthub.com/docs/hub
Then run to check verified sources for any SaaS product built on top of the database (e.g. salesforce, hubspot):
uv run dlthub --non-interactive pipeline init --list-sources
If a maintained connector exists, inform the user — it is almost always better than building from scratch.
Never ask the user to provide credentials directly. All credentials must go through secrets.toml and config.toml.
Use the setup-secrets skill to configure credentials. It will write the correct fragment to .dlt/secrets.toml safely without exposing values.
Once credentials are configured, connect and list tables using a quick Python snippet:
from sqlalchemy import create_engine, inspect
engine = create_engine("<connection_url>")
inspector = inspect(engine)
schemas = inspector.get_schema_names()
for schema in schemas:
tables = inspector.get_table_names(schema=schema)
print(f"Schema: {schema} — Tables: {tables}")
Run this so the user can see what's available. If the database is not yet reachable, skip and note this for the next skill.
Ask the user — do not proceed until all five questions are answered:
duckdb)minimal — column names and nullability only; types inferred from the datafull — column names, nullability, and data types including decimal precision/scale (default, recommended for most cases)full_with_precision — maximum detail including precision for text and binary columns; may cause type-mismatch errors on some destinations
Ref: https://dlthub.com/docs/dlt-ecosystem/verified-sources/sql_database/advanced#column-reflectionBackend based on normalization need and data size (cross-reference with data volume from step 1 of create-sql-database-pipeline):
backend="sqlalchemy" (any size)backend="sqlalchemy" (simpler, no extra deps)backend="pyarrow"; use connectorx only if the table fits easily in RAM (it reads the full result into memory)optimize-sql-performanceSuggest starting with a single small or representative table to validate the pipeline end-to-end before adding more.
Present a one-line summary:
Source: <dialect> database at <host>/<dbname>
Table: <table_name> (schema: <schema or default>)
Destination: <destination>
Backend: <backend>
Driver: <package>
Reflection level: <minimal | full | full_with_precision>
Transform before load: <brief description, e.g. "filter rows by status=active", "pseudonymize email column", "cast decimal columns" — or "none">
Then proceed to create-sql-database-pipeline with this information. If transformations are needed, address them in step 8 (Add transformation callbacks).
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub dlt-hub/dlthub-ai-harness --plugin sql-database-pipeline8 skills in this plugin
/add-tableAdd a new table or view to an existing dlt SQL database pipeline. Use when the user wants to load additional tables from the same database that already has a working pipeline./adjust-tableAdjust a working dlt SQL database pipeline for production — remove dev limits, add incremental loading, configure merge keys. Use when the user wants to remove .add_limit(), load the full table, or set up incremental loading on a cursor column. For speed/memory tuning (backend, chunk size, parallelism) use optimize-sql-performance instead. For inspecting loaded data or fixing column types/schema after a load, use validate-sql-database-data instead./create-sql-database-pipelineCreate a dlt pipeline from a SQL database source (postgres, mysql, mssql, oracle, sqlite, or any SQLAlchemy-supported database). Use when the user wants to load tables from a relational database to a destination like DuckDB, BigQuery, or Snowflake. Not for REST APIs or file sources./debug-sql-database-pipelineDebug and inspect a dlt SQL database pipeline after running it. Use after a pipeline run (success or failure) to inspect traces, load packages, schema, and diagnose errors like connection failures, missing credentials, driver issues, or failed load jobs./optimize-sql-performanceSpeed up a dlt SQL database pipeline. Use when extraction from a relational database (postgres, mysql, mssql, oracle, snowflake, etc.) is slow or memory-heavy and the user wants to optimize it — pick a faster backend, tune chunk size, parallelize tables, or reduce reflection overhead. For first-time incremental/merge setup or removing .add_limit() use adjust-table instead./validate-sql-database-dataValidate schema and data after a successful dlt SQL database pipeline load. Use when the user wants to check if loaded data looks correct, inspect table schemas, fix data types, or verify column mappings from the source database.Other plugins' skills for the same job