# data-platform Plugin - CLAUDE.md Integration Add this section to your project's CLAUDE.md to enable data-platform plugin features. ## Suggested CLAUDE.md Section ```markdown ## Data Platform Integration This project uses the data-platform plugin for data engineering workflows. ### Configuration **PostgreSQL**: Credentials in `~/.config/claude/postgres.env` **dbt**: Project path auto-detected from `dbt_project.yml` ### Available Commands | Command | Purpose | |---------|---------| | `/ingest` | Load data from files or database | | `/profile` | Generate statistical profile | | `/schema` | Show schema information | | `/explain` | Explain dbt model | | `/lineage` | Show data lineage | | `/run` | Execute dbt models | ### data_ref Convention DataFrames are stored with references. Use meaningful names: - `raw_*` for source data - `stg_*` for staged/cleaned data - `dim_*` for dimension tables - `fct_*` for fact tables - `rpt_*` for reports ### dbt Workflow 1. Always validate before running: `/run` includes automatic `dbt_parse` 2. For dbt 1.9+, check for deprecated syntax before commits 3. Use `/lineage` to understand impact of changes ### Database Access PostgreSQL tools require POSTGRES_URL configuration: - Read-only queries: `pg_query` - Write operations: `pg_execute` - Schema exploration: `pg_tables`, `pg_columns` PostGIS spatial data: - List spatial tables: `st_tables` - Check geometry: `st_geometry_type`, `st_srid`, `st_extent` ``` ## Environment Variables Add to project `.env` if needed: ```env # dbt configuration DBT_PROJECT_DIR=./transform DBT_PROFILES_DIR=~/.dbt # Memory limits DATA_PLATFORM_MAX_ROWS=100000 ``` ## Typical Workflows ### Data Exploration ``` /ingest data/raw_customers.csv /profile raw_customers /schema ``` ### ETL Development ``` /schema orders # Understand source /explain stg_orders # Understand transformation /run stg_orders # Test the model /lineage fct_orders # Check downstream impact ``` ### Database Analysis ``` /schema # List all tables pg_columns orders # Detailed schema st_tables # Find spatial data ```