- Introduced `analyst_auth_adapter.py` for managing authentication context and access control for the data analysis agent. - Added new API endpoints in `analyst.py` for chat, dashboard, asset management, and metrics, utilizing the new authentication context. - Created Pydantic models in `analyst_schemas.py` for request and response structures, ensuring consistent data handling. - Updated SQL guard logic in `sql_guard.py` to enforce access restrictions based on user roles and contexts. - Implemented migration scripts for new database tables related to the data analysis agent, enhancing data management capabilities. - Removed legacy authentication code from `auth.py`, streamlining the authentication process. This update significantly enhances the data analysis capabilities, providing a robust framework for querying and managing data securely.
15 lines
653 B
SQL
15 lines
653 B
SQL
-- =============================================================================
|
|
-- 数据分析 Agent 资产表 · 清数据(不删表结构)
|
|
-- 用途:开发/演示重置口径字典、few-shot、模板;不影响其它 agent 表
|
|
-- 问数留痕 analytics_query_log 在 02 底座里,可选一并清空(见下方注释)
|
|
-- =============================================================================
|
|
|
|
USE jinrong_agent;
|
|
|
|
TRUNCATE TABLE analytics_metric_dict;
|
|
TRUNCATE TABLE analytics_few_shot;
|
|
TRUNCATE TABLE analytics_query_template;
|
|
|
|
-- 可选:清空 NL2SQL 问数留痕(取消注释即可)
|
|
-- TRUNCATE TABLE analytics_query_log;
|