uip pm Apps 数据模型、uip pm Apps 模型
使用“uip pm Apps 数据模型”和“uip pm Apps 模型”编辑 Process Mining 应用程序的结构数据模型和语义模型(表格、字段、仪表板和指标)的语法和选项。
作为uip pm工具的一部分。本页面介绍流程应用程序上的两个模型编辑界面:
apps data-model— 结构表图表:存在哪些表、其主键/外键以及它们如何联接到Cases。apps model— 语义模型:字段及其数据类型、计算字段、仪表板和指标。包括用于针对性编辑的fields、dashboards和metrics子组,以及用于整个文档的get/update。apps data-mapping— 应用程序的输入数据映射:哪个源表格/列为哪个目标字段提供数据。与上面的数据模型不同(那是映射后的可查询表格图表)。
此处的每次写入都由 ETag 保护 — 请参阅父页面上的“概念” 。
大纲
uip pm apps data-model get <app-id> [--stage dev|published] [--destination <file>]
uip pm apps data-model add-table <app-id> --file <json-file> [--stage dev|published]
uip pm apps model get <app-id> [--stage dev|published] [--destination <file>]
uip pm apps model update <app-id> --file <json-file> --etag <etag>
uip pm apps model fields list <app-id> [--stage dev|published]
uip pm apps model fields set <app-id> <field-id> [--kind <kind>] [--display-name <text>] [--expression <json>] [--table <table-id>]
uip pm apps model fields remove <app-id> <field-id>
uip pm apps model dashboards list <app-id> [--stage dev|published]
uip pm apps model dashboards get <app-id> [--dashboard <id-or-name>] [--stage dev|published] [--destination <file>]
uip pm apps model dashboards update <app-id> [--file <json-file>] [--metrics <json-file>] --etag <etag> [--dashboard <id-or-name>]
uip pm apps model metrics list <app-id> [--stage dev|published]
uip pm apps data-mapping get <app-id> [--stage dev] [--destination <file>]
uip pm apps data-mapping update <app-id> --file <json-file> --etag <etag> [--stage dev]
uip pm apps data-model get <app-id> [--stage dev|published] [--destination <file>]
uip pm apps data-model add-table <app-id> --file <json-file> [--stage dev|published]
uip pm apps model get <app-id> [--stage dev|published] [--destination <file>]
uip pm apps model update <app-id> --file <json-file> --etag <etag>
uip pm apps model fields list <app-id> [--stage dev|published]
uip pm apps model fields set <app-id> <field-id> [--kind <kind>] [--display-name <text>] [--expression <json>] [--table <table-id>]
uip pm apps model fields remove <app-id> <field-id>
uip pm apps model dashboards list <app-id> [--stage dev|published]
uip pm apps model dashboards get <app-id> [--dashboard <id-or-name>] [--stage dev|published] [--destination <file>]
uip pm apps model dashboards update <app-id> [--file <json-file>] [--metrics <json-file>] --etag <etag> [--dashboard <id-or-name>]
uip pm apps model metrics list <app-id> [--stage dev|published]
uip pm apps data-mapping get <app-id> [--stage dev] [--destination <file>]
uip pm apps data-mapping update <app-id> --file <json-file> --etag <etag> [--stage dev]
uip pm Apps 数据模型获取
获取应用的结构化数据模型(具有主/外键和列角色的表格)。返回模型的 ETag 以供参考; add-table 本身不需要 --etag,因为它会重新读取并合并自己的更改。
参数
| 名称 | 必填 | 用途 |
|---|---|---|
<app-id> | 是 | 流程应用程序 ID。 |
选项
| 长 | 值 | 默认 | 描述 |
|---|---|---|---|
--stage <stage> | dev | published | dev | 应用程序阶段。 |
--destination <local-file> | 路径 | — | 将模型 JSON 写入该文件而非输出信封。 |
数据形状(--输出 json)
{ "Code": "PmAppsDataModelGet", "Data": { "AppId": "9c46289e", "ETag": "W/\"3\"", "Model": {} } }
{ "Code": "PmAppsDataModelGet", "Data": { "AppId": "9c46289e", "ETag": "W/\"3\"", "Model": {} } }
当传递 Destination 时,Model 将替换 --destination。
uip pm Apps 数据模型添加表格
将自定义 dbt 模型注册为可查询的数据模型表。Process Mining 以案例为中心:可查询的表格必须是 Cases 根或链接到它 — 为表格提供一个(可以为空)Case_ID 列,并对其使用 Cases 的外键,以松散链接独立的分析表。之后重新提取以将其具体化。不接受 --etag:它会自行读取当前数据模型并合并到该文档中,因此两者之间的写入登陆仍会冲突,并且该命令会重新运行。
参数
| 名称 | 必填 | 用途 |
|---|---|---|
<app-id> | 是 | 流程应用程序 ID。 |
选项
| 长 | 值 | 必填 | 描述 |
|---|---|---|---|
--file <json-file> | 路径 | 是 | 包含要添加的表格的 JSON — 单个数据模型表格、数组或 { tables } 对象。每个:{ name, primaryKey, foreignKeys: [{ table: "Cases", column: "Case_ID" }] }(type 默认为 "Object")。 |
--stage <stage> | dev | published | 否 | 默认 dev。 |
表格按 name 匹配:替换现有条目,附加新条目。
示例
uip pm apps data-model add-table 9c46289e --file ./Workload_weekly.table.json
uip pm apps data-model add-table 9c46289e --file ./Workload_weekly.table.json
数据形状(--输出 json)
{
"Code": "PmAppsDataModelAddTable",
"Data": {
"AppId": "9c46289e",
"AddedTables": ["Workload_weekly"],
"IngestionNeeded": true,
"Instructions": "Re-ingest to materialize the table(s): uip pm ingestions create 9c46289e --wait — then query them. Run 'uip pm apps publish 9c46289e' to push to dashboards."
}
}
{
"Code": "PmAppsDataModelAddTable",
"Data": {
"AppId": "9c46289e",
"AddedTables": ["Workload_weekly"],
"IngestionNeeded": true,
"Instructions": "Re-ingest to materialize the table(s): uip pm ingestions create 9c46289e --wait — then query them. Run 'uip pm apps publish 9c46289e' to push to dashboards."
}
}
UserError_TableIsDeleted如果表格没有指向 的路径,则以Cases 样式拒绝失败。无名表格条目或没有可用表格的文件会在进行任何写入之前在客户端失败。
获取 uip pm 应用程序模型
获取应用程序的语义模型(数据类型字段、计算字段、指标和仪表板视图)— update 采用的形状。返回 model update 需要用作 --etag 的模型的 ETag。
参数
| 名称 | 必填 | 用途 |
|---|---|---|
<app-id> | 是 | 流程应用程序 ID。 |
选项
| 长 | 值 | 默认 | 描述 |
|---|---|---|---|
--stage <stage> | dev | published | dev | 应用程序阶段。 |
--destination <local-file> | 路径 | — | 将模型 JSON 写入该文件而非输出信封。 |
数据形状(--输出 json)
{ "Code": "PmAppsModelGet", "Data": { "AppId": "9c46289e", "ETag": "W/\"3\"", "Model": {} } }
{ "Code": "PmAppsModelGet", "Data": { "AppId": "9c46289e", "ETag": "W/\"3\"", "Model": {} } }
uip pm Apps 模型更新
从本地 JSON 文件替换整个应用程序模型。仅适用于开发者。对于单个字段,首选apps model fields set,可就地编辑;完整替换必须包含从中写入数据的 model get 的 ETag — 在此处获取新的 ETag 会使并发检查失败。
参数
| 名称 | 必填 | 用途 |
|---|---|---|
<app-id> | 是 | 流程应用程序 ID。 |
选项
| 长 | 值 | 必填 | 描述 |
|---|---|---|---|
--file <json-file> | 路径 | 是 | 包含完整模型(由 model get 返回)的本地 JSON 文件。 |
--etag <etag> | 字符串 | 是 | 此编辑所基于的模型的 ETag。 |
数据形状(--输出 json)
{ "Code": "PmAppsModelUpdate", "Data": { "AppId": "9c46289e", "Versions": [4], "Instructions": "Model saved on dev. Run 'uip pm apps publish 9c46289e' to push it to the dashboards; if a field's data kind changed, re-ingest so the data matches: uip pm ingestions create 9c46289e --wait." } }
{ "Code": "PmAppsModelUpdate", "Data": { "AppId": "9c46289e", "Versions": [4], "Instructions": "Model saved on dev. Run 'uip pm apps publish 9c46289e' to push it to the dashboards; if a field's data kind changed, re-ingest so the data matches: uip pm ingestions create 9c46289e --wait." } }
过时的 --etag 将因冲突而失败 — 通过 model get 重新读取,重做编辑,然后重试。UnsupportedOperatorArgumentDataKind 错误表示仪表板筛选器、计算字段或指标阈值仍会将字段与其旧数据类型的常量进行比较。请在更改类型之前修复或删除该比较操作。
uip pm Apps 模型字段列表
列出应用程序表格中的每个字段,标明其数据类型以及是映射列还是计算字段。
参数
| 名称 | 必填 | 用途 |
|---|---|---|
<app-id> | 是 | 流程应用程序 ID。 |
选项
| 长 | 值 | 默认 | 描述 |
|---|---|---|---|
--stage <stage> | dev | published | dev | 应用程序阶段。 |
数据形状(--输出 json)
{ "Code": "PmAppsFieldsList", "Data": [{ "Table": "Cases", "Id": "Case_status", "Display": "Status", "Kind": "nominal", "Type": "column" }] }
{ "Code": "PmAppsFieldsList", "Data": [{ "Table": "Cases", "Id": "Case_status", "Display": "Status", "Kind": "nominal", "Type": "column" }] }
Type 为 "column"(映射)或 "calculated"。
已设置 UIP PM Apps 模型字段
创建或编辑字段(内部 ETag 安全 — 读取并合并自己的库)。更改其数据类型、重命名,或将其转换为计算字段。
参数
| 名称 | 必填 | 用途 |
|---|---|---|
<app-id> | 是 | 流程应用程序 ID。 |
<field-id> | 是 | 字段 ID。 |
选项
| 长 | 值 | 描述 |
|---|---|---|
--kind <kind> | ordinal|nominal|numeric|datetime|boolean|percentage|currency|duration | 数据类型。(id/ref 是结构性的,不可设置。) |
--display-name <text> | 字符串 | 显示名称。 |
--expression <json> | JSON(内联或 @file.json) | 计算字段表达式节点。提供该选项会将字段转变为计算字段。 |
--table <table-id> | 字符串 | 目标表格 — 仅在创建新字段时才需要。 |
至少需要“--kind”/“--display-name”/“--expression”其中一个。创建字段需要 --table、--expression 和 --kind;无法以这种方式创建映射列(它们来自提取的数据)。已拒绝在现有映射列上设置 --expression — 改为创建具有不同 ID 的新计算字段。如果创建的 ID 与其他表格中的字段冲突,则系统会拒绝其创建,而不是静默编辑该字段。
示例
uip pm apps model fields set 9c46289e Case_status --kind ordinal
uip pm apps model fields set 9c46289e Case_status --kind ordinal
数据形状(--输出 json)
{ "Code": "PmAppsFieldsSet", "Data": { "AppId": "9c46289e", "Field": "Case_status", "Action": "updated", "Table": "Cases", "Versions": [4], "Instructions": "Model saved on dev. Run 'uip pm apps publish 9c46289e' to push it to the dashboards; if a field's data kind changed, re-ingest so the data matches: uip pm ingestions create 9c46289e --wait." } }
{ "Code": "PmAppsFieldsSet", "Data": { "AppId": "9c46289e", "Field": "Case_status", "Action": "updated", "Table": "Cases", "Versions": [4], "Instructions": "Model saved on dev. Run 'uip pm apps publish 9c46289e' to push it to the dashboards; if a field's data kind changed, re-ingest so the data matches: uip pm ingestions create 9c46289e --wait." } }
Action 为 "created" 或 "updated"。
删除 UIP PM Apps 模型字段
从模型中删除字段。
参数
| 名称 | 必填 | 用途 |
|---|---|---|
<app-id> | 是 | 流程应用程序 ID。 |
<field-id> | 是 | 字段 ID。 |
数据形状(--输出 json)
{ "Code": "PmAppsFieldsRemove", "Data": { "AppId": "9c46289e", "Field": "Case_status", "Table": "Cases", "Versions": [4], "Instructions": "..." } }
{ "Code": "PmAppsFieldsRemove", "Data": { "AppId": "9c46289e", "Field": "Case_status", "Table": "Cases", "Versions": [4], "Instructions": "..." } }
uip pm Apps 模型仪表板
同一模型文档 model get/update 往返 — list/get/update 的仪表板形状视图在 view.dashboards 上工作。
uip pm Apps 模型仪表板列表
列出流程应用程序的仪表板。
| 名称/选项 | 必填 | 用途 |
|---|---|---|
<app-id> | 是 | 流程应用程序 ID。 |
--stage <stage> | 否 | dev | published,默认为 dev。 |
{ "Code": "PmAppsDashboardsList", "Data": [{ "Id": "overview", "Name": "Overview", "Layout": "three-left-one-right", "Charts": 4, "Metrics": 5, "IsVisible": true }] }
{ "Code": "PmAppsDashboardsList", "Data": [{ "Id": "overview", "Name": "Overview", "Layout": "three-left-one-right", "Charts": 4, "Metrics": 5, "IsVisible": true }] }
Charts 是仪表板的“图表 ID”矩阵的展平计数。
uip pm Apps 模型仪表板获取
获取具有 ETag update 需求的流程应用程序的仪表板。
| 长 | 值 | 描述 |
|---|---|---|
--stage <stage> | dev|published | 默认 dev。 |
--dashboard <id-or-name> | 字符串 | 仅返回此仪表板,而不是整个 view 部分。先按 ID 匹配,再按确切名称匹配 — 模糊的名称(多个仪表板共享该名称)将失败,要求您按 ID 选择。 |
--destination <local-file> | 路径 | 将 JSON 写入此文件而不是信封中。 |
uip pm apps model dashboards get 9c46289e --dashboard 'Overview' --destination ./dashboard.json
uip pm apps model dashboards get 9c46289e --dashboard 'Overview' --destination ./dashboard.json
{ "Code": "PmAppsDashboardsGet", "Data": { "Dashboard": "Overview", "ETag": "W/\"3\"", "Destination": "./dashboard.json" } }
{ "Code": "PmAppsDashboardsGet", "Data": { "Dashboard": "Overview", "ETag": "W/\"3\"", "Destination": "./dashboard.json" } }
更新 uip pm Apps 模型仪表板
从本地 JSON 文件更新流程应用程序的仪表板。仅限开发阶段。
| 长 | 值 | 必填 | 描述 |
|---|---|---|---|
--file <local-file> | 路径 | 否* | 如果给定 --dashboard,则为一个仪表板,否则为整个 view 部分。 |
--metrics <local-file> | 路径 | 否* | 要添加或按 ID 替换的指标定义 JSON 数组 — 写入与--file相同的请求中,因此其引入的图表可以引用在同一写入中添加的指标。 |
--etag <etag> | 字符串 | 是 | 此编辑所基于的模型的 ETag。 |
--dashboard <id-or-name> | 字符串 | 否 | 哪个仪表板被 --file 替换 — 需要 --file;若无 --file,则系统将拒绝传递数据。 |
* --file/--metrics 中至少有一个为必填项。
uip pm apps model dashboards update 9c46289e --dashboard 'Overview' --file ./dashboard.json --etag 'W/"3"'
uip pm apps model dashboards update 9c46289e --dashboard 'Overview' --file ./dashboard.json --etag 'W/"3"'
{ "Code": "PmAppsDashboardsUpdate", "Data": { "Dashboard": "Overview", "Versions": [4], "Instructions": "Saved on dev. Run 'uip pm apps publish 9c46289e' to push the change to the dashboards; if the publish reports IngestionNeeded, re-ingest with 'uip pm ingestions create 9c46289e --wait'." } }
{ "Code": "PmAppsDashboardsUpdate", "Data": { "Dashboard": "Overview", "Versions": [4], "Instructions": "Saved on dev. Run 'uip pm apps publish 9c46289e' to push the change to the dashboards; if the publish reports IngestionNeeded, re-ingest with 'uip pm ingestions create 9c46289e --wait'." } }
uip pm Apps 模型指标列表
列出图表可以从应用程序的数据模型中引用的指标。添加或替换为 dashboards update --metrics。
| 名称/选项 | 必填 | 用途 |
|---|---|---|
<app-id> | 是 | 流程应用程序 ID。 |
--stage <stage> | 否 | dev|published,默认为 dev。 |
{ "Code": "PmAppsMetricsList", "Data": [{ "Id": "avg_throughput", "Display": "Avg. throughput", "Aggregation": "AVERAGE", "Argument": "Case_throughput_time" }] }
{ "Code": "PmAppsMetricsList", "Data": [{ "Id": "avg_throughput", "Display": "Avg. throughput", "Aggregation": "AVERAGE", "Argument": "Case_throughput_time" }] }
uip pm Apps 数据映射获取
获取应用程序的输入数据映射 — 与 apps create --data-mapping 采用的形状相同,因此可以使用 data-mapping update 对其进行编辑并推送。返回映射的 ETag,这是该更新需要的 --etag。
| 长 | 值 | 默认 | 描述 |
|---|---|---|---|
--stage <stage> | dev | published | dev | 要读取的应用程序阶段。 |
--destination <local-file> | 路径 | — | 将映射 JSON 写入此文件,而不是输出信封。 |
uip pm apps data-mapping get 9c46289e --destination ./mapping.json
uip pm apps data-mapping get 9c46289e --destination ./mapping.json
{ "Code": "PmAppsDataMappingGet", "Data": { "AppId": "9c46289e", "ETag": "W/\"639204059477096903\"", "Destination": "./mapping.json" } }
{ "Code": "PmAppsDataMappingGet", "Data": { "AppId": "9c46289e", "ETag": "W/\"639204059477096903\"", "Destination": "./mapping.json" } }
uip pm Apps 数据映射更新
替换从本地 JSON 文件(ETag 安全)映射的应用程序输入数据 — 修复错误的映射,无需重新创建应用。应用于下次提取;与转换修复不同,映射更改用于管理原始文件的解析方式,因此transformations apply无法追溯应用。
选项
| 长 | 值 | 必填 | 描述 |
|---|---|---|---|
--file <json-file> | 路径 | 是 | 完整输入数据映射 ({ "Tables": [...] }) — 完全替换存储的映射。每个字段的默认设置与 apps create --data-mapping 相同。 |
--etag <etag> | 字符串 | 是 | 此编辑所基于的映射的 ETag。 |
--stage <stage> | dev | 否 | 只有 dev 可写 — 后端在两个阶段都提供 GET 服务,但仅接受在开发上写入操作。 |
uip pm apps data-mapping update 9c46289e --file ./mapping.json --etag 'W/"639204059477096903"'
uip pm apps data-mapping update 9c46289e --file ./mapping.json --etag 'W/"639204059477096903"'
{ "Code": "PmAppsDataMappingUpdate", "Data": { "AppId": "9c46289e", "Tables": ["Event_log"], "IngestionNeeded": true, "Instructions": "Re-ingest for the new mapping to take effect: uip pm ingestions create 9c46289e --wait. Re-upload first (uip pm files upload) only if the source columns changed." } }
{ "Code": "PmAppsDataMappingUpdate", "Data": { "AppId": "9c46289e", "Tables": ["Event_log"], "IngestionNeeded": true, "Instructions": "Re-ingest for the new mapping to take effect: uip pm ingestions create 9c46289e --wait. Re-upload first (uip pm files upload) only if the source columns changed." } }
过时的 --etag 将因冲突而失败 — 通过 data-mapping get 重新读取,重做编辑,然后重试。不含表格的映射文件在客户端会失败,而不是会擦除应用程序的映射。
相关内容
uip pm— 概述和appsCRUD。ingestions和transformations— 具体化数据模型或字段更改。conformance、deviations和query— 分析生成的数据。
另请参阅
- 大纲
- uip pm Apps 数据模型获取
- 参数
- 选项
- 数据形状(--输出 json)
- uip pm Apps 数据模型添加表格
- 参数
- 选项
- 示例
- 数据形状(--输出 json)
- 获取 uip pm 应用程序模型
- 参数
- 选项
- 数据形状(--输出 json)
- uip pm Apps 模型更新
- 参数
- 选项
- 数据形状(--输出 json)
- uip pm Apps 模型字段列表
- 参数
- 选项
- 数据形状(--输出 json)
- 已设置 UIP PM Apps 模型字段
- 参数
- 选项
- 示例
- 数据形状(--输出 json)
- 删除 UIP PM Apps 模型字段
- 参数
- 数据形状(--输出 json)
- uip pm Apps 模型仪表板
- uip pm Apps 模型仪表板列表
- uip pm Apps 模型仪表板获取
- 更新 uip pm Apps 模型仪表板
- uip pm Apps 模型指标列表
- uip pm Apps 数据映射获取
- uip pm Apps 数据映射更新
- 选项
- 相关内容
- 另请参阅