Add new data-platform plugin for data engineering workflows with: MCP Server (32 tools): - pandas operations (14 tools): read_csv, read_parquet, read_json, to_csv, to_parquet, describe, head, tail, filter, select, groupby, join, list_data, drop_data - PostgreSQL/PostGIS (10 tools): pg_connect, pg_query, pg_execute, pg_tables, pg_columns, pg_schemas, st_tables, st_geometry_type, st_srid, st_extent - dbt integration (8 tools): dbt_parse, dbt_run, dbt_test, dbt_build, dbt_compile, dbt_ls, dbt_docs_generate, dbt_lineage Plugin Features: - Arrow IPC data_ref system for DataFrame persistence across tool calls - Pre-execution validation for dbt with `dbt parse` - SessionStart hook for PostgreSQL connectivity check (non-blocking) - Hybrid configuration (system ~/.config/claude/postgres.env + project .env) - Memory management with 100k row limit and chunking support Commands: /initial-setup, /ingest, /profile, /schema, /explain, /lineage, /run Agents: data-ingestion, data-analysis Test suite: 71 tests covering config, data store, pandas, postgres, dbt tools Addresses data workflow issues from personal-portfolio project: - Lost data after multiple interactions (solved by Arrow IPC data_ref) - dbt 1.9+ syntax deprecation (solved by pre-execution validation) - Ungraceful PostgreSQL error handling (solved by SessionStart hook) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
49 lines
1.2 KiB
Markdown
49 lines
1.2 KiB
Markdown
# /schema - Schema Exploration
|
|
|
|
Display schema information for database tables or DataFrames.
|
|
|
|
## Usage
|
|
|
|
```
|
|
/schema [table_name | data_ref]
|
|
```
|
|
|
|
## Workflow
|
|
|
|
1. **Determine target**:
|
|
- If argument is a loaded data_ref, show DataFrame schema
|
|
- If argument is a table name, query database schema
|
|
- If no argument, list all available tables and DataFrames
|
|
|
|
2. **For DataFrames**:
|
|
- Use `describe` to get column info
|
|
- Show dtypes, null counts, sample values
|
|
|
|
3. **For database tables**:
|
|
- Use `pg_columns` for column details
|
|
- Use `st_tables` to check for PostGIS columns
|
|
- Show constraints and indexes if available
|
|
|
|
4. **Report**:
|
|
- Column name, type, nullable, default
|
|
- For PostGIS: geometry type, SRID
|
|
- For DataFrames: pandas dtype, null percentage
|
|
|
|
## Examples
|
|
|
|
```
|
|
/schema # List all tables and DataFrames
|
|
/schema customers # Show table schema
|
|
/schema sales_data # Show DataFrame schema
|
|
```
|
|
|
|
## Available Tools
|
|
|
|
Use these MCP tools:
|
|
- `pg_tables` - List database tables
|
|
- `pg_columns` - Get column info
|
|
- `pg_schemas` - List schemas
|
|
- `st_tables` - List PostGIS tables
|
|
- `describe` - Get DataFrame info
|
|
- `list_data` - List DataFrames
|