# fast_etl **Repository Path**: sonic3k/fast_etl ## Basic Information - **Project Name**: fast_etl - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-11-04 - **Last Updated**: 2026-11-09 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # fast_etl — ODS ETL 配置管理(FastAPI + Layui + MCP) `D:\dev2026\ods_etl`(Django 版)的移植重构版:管理台 FastAPI + Jinja2 + Layui 2.9(本地资源,零 CDN), 新增 MCP 服务(streamable-http `/mcp`);三大 CLI(file_scan / data_extract / sort_sql)与 etl_scripts 原样保留。 数据库与源头完全分离:**etl_system2**(系统配置库)与 **etl_ods2**(业务库)连接配置完全独立,可指向不同服务器。 ## 快速开始 ```powershell pip install -r requirements.txt # 需已安装 ODBC Driver 17 for SQL Server python scripts/create_db.py # 创建 etl_system2 / etl_ods2 alembic upgrade head # 建表(六表 + users) python scripts/init_admin_user.py # 账号 admin / admin123 python scripts/create_ods_sales.py # (可选)建演示业务表 python scripts/seed_demo.py # (可选)播种示例配置(需先在页面登记 ODS_SALES) python admin_api.py # 管理台 http://127.0.0.1:8200/ ``` CLI(须在项目根目录执行):`python file_scan.py` / `python data_extract.py` / `python sort_sql.py` ## MCP 接入 - 端点:`http://127.0.0.1:8200/mcp`(streamable-http) - 鉴权:先 `POST /api/auth/login`(`{"username":"admin","password":"..."}`)取 `token`, 请求头带 `Authorization: Bearer ` - 工具:查询类 11 个、触发运行类 4 个、写操作类 12 个(须 `confirm=true`)、抽取状态管理类 2 个 (详见 `.codebuddy/skills/ods-etl-config-admin/references/config_admin.md`) ## 文档 - 全局约定与运行说明:`agents.md` - 管理台详述 + 部署指引 + 生产检查项:`.codebuddy/skills/ods-etl-config-admin/references/config_admin.md`