Documentation Index
Fetch the complete documentation index at: https://docs.xpertai.cn/llms.txt
Use this file to discover all available pages before exploring further.
semantic_model 资源用于把 Xpert 语义模型接入 UOSE系统。它把模型、Cube、指标、度量和维度同步为本体对象,并通过语义查询接口提供只读分析动作。
同步对象
同步后通常包含:semantic_model:顶层语义模型。semantic_cube:模型下的分析 Cube。semantic_indicator:业务指标。semantic_measure:Cube 下的度量。semantic_dimension:Cube 下的维度。
semantic_model_has_cubesemantic_cube_has_indicatorsemantic_cube_has_measuresemantic_cube_has_dimension
连接与能力
连接通常指向 xpert-pro API。Secret 支持:current_user_oidc:使用当前用户 OIDC token。static_bearer:使用静态 Bearer token。api_key:使用 API key。
modelIds:同步后的本地模型过滤。endpoints.modelList:语义模型列表接口。endpoints.modelById:模型详情接口。endpoints.query:语义查询接口。pagination.models:模型列表分页配置。
Analysis Contract
analysis_contract 是语义模型资源执行事实查询的关键。它通常出现在 semantic_cube 和 semantic_indicator 属性中,包含:
- modelId。
- cubeId。
- cubeName。
- metricRefs。
- defaultTimeDimension。
- supportedGranularities。
- defaultDimensions。
- filterableFields。
analysis_contract 时,实体仍可被搜索和展示,但查询动作会被拒绝。
Actions
常用动作包括:semantic_model.query_metric_snapshot:查询指标时间序列。semantic_model.query_cube_slice:查询 Cube 分组切片。semantic_model.query_calculated_expression:查询计算表达式。semantic_model.query_statement:执行受控语义查询语句。semantic_model.query_native_dsl:执行原生语义查询 DSL。
推荐使用方式
- 注册资源并完成 full sync。
- 在本体空间确认模型、Cube、指标、度量和维度已经入图。
- 通过
queryEntities定位目标 indicator 或 cube。 - 通过
getEntityNeighborhood查看所属 Cube 和可用维度。 - 通过
discoverActions确认可执行查询动作。 - 通过
simulateAction校验时间窗、粒度、维度和 filters。 - 通过
executeAction返回趋势、表格或分析摘要。