Files
Mutual_Fund/nl2sql/semantic_catalog.json
T

70 lines
2.9 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"version": "2026-09-12",
"terms": [
{
"term": "基金产品",
"enabled": true,
"aliases": ["基金产品", "产品", "基金", "基金名称", "产品名称"],
"tables": ["fin_product"],
"fields": ["product_code", "product_name", "product_type", "risk_level", "status"],
"value_hint": "product_type 实际枚举值为:货币型/债券型/混合型/股票型/指数型/QDII(注意是'XX型',不是 Schema 注释里的'股票基金');status 实际枚举值为:在售/暂停/到期/清盘,查在售产品用 status = '在售'"
},
{
"term": "股票型基金",
"enabled": true,
"aliases": ["股票型", "股票基金", "股票型基金", "权益类"],
"tables": ["fin_product"],
"fields": ["product_type"],
"value_hint": "fin_product.product_type 实际枚举值为:货币型/债券型/混合型/股票型/指数型/QDII;股票型基金必须用 product_type = '股票型',不要使用 Schema 注释里的'股票基金'"
},
{
"term": "客户",
"enabled": true,
"aliases": ["客户", "投资人", "持有人"],
"tables": ["fin_customer_profile", "fin_holdings", "fin_risk_assessment"],
"fields": ["customer_id", "risk_level", "customer_level"],
"value_hint": "fin_customer_profile.risk_level / fin_risk_assessment.risk_level 实际枚举值为 R1-R5(R1 最保守,R5 最激进,与产品风险等级同一口径);查'保守型/稳健型客户'对应 R1/R2,'激进型客户'对应 R5"
},
{
"term": "持仓",
"enabled": true,
"aliases": ["持仓", "持有基金", "资产配置"],
"tables": ["fin_holdings"],
"fields": ["customer_id", "product_id", "shares", "current_value", "profit_loss", "profit_ratio", "status"]
},
{
"term": "收益率",
"enabled": true,
"aliases": ["收益率", "收益", "回报率", "近一年收益"],
"tables": ["fund_performance"],
"fields": ["return_rate", "period", "calc_date"],
"metric_hint": "收益率优先使用 fund_performance.return_rate,并结合 period 或 calc_date 限定统计区间"
},
{
"term": "最大回撤",
"enabled": true,
"aliases": ["最大回撤", "回撤"],
"tables": ["fund_performance"],
"fields": ["max_drawdown", "period", "calc_date"],
"metric_hint": "最大回撤使用 fund_performance.max_drawdown,不与收益率字段混用"
}
],
"relationships": [
{
"left": "fin_holdings.product_id",
"right": "fin_product.id",
"meaning": "持仓通过 product_id 关联基金产品"
},
{
"left": "fund_performance.product_id",
"right": "fin_product.id",
"meaning": "基金业绩通过 product_id 关联基金产品"
},
{
"left": "fin_holdings.customer_id",
"right": "fin_customer_profile.customer_id",
"meaning": "持仓通过 customer_id 关联客户画像"
}
]
}