- 发行说明
- 在开始之前
- 入门指南
- 集成
- 管理访问权限
- 使用流程应用程序
- 创建应用程序
- 正在加载数据
- 自定义流程应用程序
- 数据转换
- TemplateOne 应用程序模板
- “购买到付款”应用程序模板
- “订单到现金”应用模板
- 基本故障排除指南
简介
从应用程序模板创建流程应用程序时,您需要确保流程应用程序中使用的数据以正确的方式反映您的业务流程。借助数据转换,您可以自定义用于Process Mining 的数据。
数据转换使您能够:
- add new fields for
group byandfilters. For example, Quality check type. - add events. For example, Invoice quality check done.
- 添加标签。例如,无法满足 SLA,违反四眼原则。
- 添加用于计算 KPI 的业务逻辑。 例如
Case_has_maverick_buying。 - 为计算定义新的输入字段。
版本控制转换
目前,产品中没有转换代码的版本控制。 导入新转换时,以前的转换将被覆盖。 无法还原到先前版本的转换。
建议在进行更改时保留代码先前版本的本地副本。要跟踪更改,可以在版本控制系统(如 GIT 或 SVN)中对本地计算机上的转换进行版本控制。这样,您可以使用版本控制系统回滚到以前的版本,并在需要时将这些转换导入产品。
先决条件
开始编辑数据转换时,强烈建议您:
- 对 SQL 有深入的了解;
- 熟悉用于数据提取的源系统。
工具
编辑数据转换需要代码编辑器。Visual Studio Code 是推荐用于编辑数据转换的代码编辑器。您可以从“下载 Visual Studio 代码网页”下载 Visual Studio 代码。
It is recommended to run and test the data transformations outside Process Mining, before you import the edited transformation in your process app. To run and test the data transformations, a local test environment is required.
请参阅设置本地测试环境。
Customizing the transformations
每个流程应用程序都有相应的数据转换集。 自定义数据转换需要执行多个步骤。
- 从流程应用程序导出转换。
- 在 Visual Studio Code 中打开转换。
- 运行转换*。
- 编辑转换。
- 在本地测试环境中测试转换。*
- 在 Process Mining 的测试流程应用程序中导入并测试转换。
- 在流程应用程序中导入转换。
- 在本地测试环境中运行和测试转换是可选步骤。
1. Export the transformations from the process app
请按照以下步骤从流程应用程序导出转换。
| 步骤 | 操作 |
|---|---|
|
1 |
打开Process Mining 门户。 |
|
2 |
Go to the Process apps tab and locate the app for which you want to export the transformations. |
|
3 |
单击 |
转换将作为.zip文件导出并下载到您的默认下载文件夹。
2. Open the transformations in Visual Studio Code
请按照以下步骤在 Visual Studio Code 中打开转换。
| 步骤 | 操作 |
|---|---|
| 1 | 在 Windows 资源管理器中,在虚拟环境所在的文件夹中为导出的转换创建一个文件夹。 例如 C:\My_transformations\TemplateOne-MultiFiles。 |
| 2 | 解压缩文件夹中导出的转换.zip文件。 |
下图显示了一个示例。
| 步骤 | 操作 |
|---|---|
| 3 | In Visual Studio Code, go to File -> Open Folder... and select the folder that contains the unzipped transformations. |
下图显示了一个示例。
The dbt project is interpreted.
Date and time formats
Snowflake 使用的日期和时间格式与 SQL Server 不同。 如果为流程应用程序的转换定义了日期和时间变量,则必须将dbt_project.yml中的日期和时间格式更改为 SQL Server 所需的格式。 在使用新转换创建.zip文件之前,您必须将日期和时间格式更改回 Snowflake 所需的格式。
如果未在dbt_project.yml文件中定义日期和时间格式,则使用默认值。
对于 SQL Server,日期和时间格式由整数定义,而对于 Snowflake,日期和时间格式由字符串定义。
下表描述了 SQL Server 和 Snowflake 的不同(默认)格式。
| 变量 | SQL Server 格式 | 雪花格式 |
|---|---|---|
date_format | 23 | 'YYYY-MM-DD' |
time_format | 14 | 'hh24:mi:ss.ff3' |
datetime_format | 21 | 'YYYY-MM-DD hh24:mi:ss.ff3' |
有关详细信息,请参阅:
- 有关使用 Snowflake 进行转换中的日期和时间格式的Snowflake 官方文档。
- 有关“使用 SQL Server 进行日期和时间转换”的 Microsoft SQL Server 官方文档。
3. Run the transformations
Running the transformations is only applicable if you want to test the transformations outside Process Mining on a local test environment.
最好在开始编辑转换之前运行转换。 这使您可以检查设置是否正确以及数据是否正确加载。
在开始之前
要运行转换,您必须:
-
为流程应用程序创建新的数据库架构。 您可以在 Microsoft SQL Server Management Studio 中执行此操作。 请按照以下步骤操作。
步骤 操作 1 In the Object Explorer in Microsoft SQL Server Management Studio, go the folder of your database in the Databases folder. 2 Right-click on Security and select New -> Schema...
下图显示了 SQL Server 身份验证窗口。
有关更多信息,请参阅Microsoft 官方文档。
-
在新架构中加载数据,并确保架构中提供所需的输入表。 您可以使用提取程序加载数据,直接从 Microsoft SQL Server Management Studio 中的
.csv文件加载数据。 请按照以下步骤操作步骤 操作 1 In the Object Explorer in Microsoft SQL Server Management Studio, locate your database in the Databases folder. 2 Right-click on the name of your database and select Tasks -> Import Flat File... 备注:It is recommended to use a small dataset for testing data transformations. The lower the record count of the dataset, the faster transformations will be executed.
设置 Profiles.yml
When you open a dbt project in Visual Studio Code for the first time, a dbt message is displayed, indicating that the profile corresponding to your new transformations cannot be found. See the illustration below for an example.
If you start editing transformations, you must first set up a profiles.yml file that is connected to your Microsoft SQL Server database. For new transformations, you can extend the profiles.yml file by adding a new entry.
以下是profiles.yml文件的模板,或单击链接以下载模板: profiles.yml 。
my-app-template:
outputs:
default:
type: sqlserver
driver: 'ODBC Driver 17 for SQL Server'
server:
port:
user:
password:
database:
schema:
target: default
my-app-template:
outputs:
default:
type: sqlserver
driver: 'ODBC Driver 17 for SQL Server'
server:
port:
user:
password:
database:
schema:
target: default
| 步骤 | 操作 |
|---|---|
| 1 | 打开文本编辑器。 例如记事本++。 |
| 2 | 复制并粘贴上述模板中的内容。 |
| 3 | 将my-app-template替换为dbt_project.yml中显示的profile名称。例如 uipathTemplateOne。 请参见下图。 |
| 3 | 编辑文件,使其指向刚刚创建的架构。 |
| 4 | 将profiles.yml文件保存在不包含 dbt 项目的文件夹中(请参见下面的屏幕截图)。例如 C:\My_transformations。 |
| 5 | 使用包含profiles.yml文件的文件夹的文件路径创建名为 DBT_PROFILES_DIR 的环境变量。 |
By default, the source data is stored in the schema where the transformations run. If your source tables are in a different schema, you can define this schema in the schema_sources variable.
有关如何配置配置文件的更多信息,请参阅官方 dbt 文档。
Running the transformations
请按照以下步骤运行转换。
| 步骤 | 操作 |
|---|---|
| 1 | In Visual Studio Code, right-click on the models folder and select Open in Integrated Terminal from the context menu. |
| 2 | 在集成终端的命令提示符处输入dbt build 。 |
4. Edit the transformations
有关编辑转换的准则,请参阅编辑转换和编写 SQL 的提示。
5. Test the transformations on a local test environment
Test the transformations is only applicable if you want to test the transformations outside Process Mining on a local test environment.
请按照以下步骤测试转换。
| 步骤 | 操作 |
|---|---|
|
1 |
在 Visual Studio Code 的集成终端的命令提示符处输入 |
|
2 |
检查 SQL Server Management Studio 中的数据以验证值。
|
在本地测试环境中编辑并测试转换,直到转换运行没有任何错误并且数据正确为止。
6. Import and test the transformations in a test process app in Process Mining
It is strongly recommended to run the new transformations in a test process app in Process Mining before importing the transformations in the original process app. Since the transformations are tested on a local SQL Server environment, errors may occur when running the new transformations in Snowflake.
另请参阅4. 编辑转换。
Snowflake uses a different date and time formats than SQL Server. If you have changed the date and time formats in dbt_project.yml to to test the transformations SQL Server you must change the date and time formats back to the format required by Snowflake, before you create the .zip file with the new transformations.
Follow these steps to import and test the transformations in a test process app in Process Mining.
| 步骤 | 操作 |
|---|---|
|
1 |
在 Windows 资源管理器中,转到存储转换的文件夹 例如 |
|
2 |
转到 Process Mining 门户,然后根据与流程应用程序相同的应用程序模板创建新的流程应用程序。 |
|
3 |
On the Process apps tab and locate the test process app. |
|
4 |
单击 |
|
5 |
Select the |
|
6 |
检查仪表板以查看数据是否正确显示。 |
7. Import the transformations in the process app
导入转换后,新的转换将自动运行。 这将立即影响已发布的流程应用程序中显示的数据。 强烈建议在单独的测试流程应用程序中测试新转换,以防止出现任何错误(请参阅步骤 4:在 Process Mining 的测试流程应用程序中导入和测试转换)。
运行错误的转换将导致最终用户无法看到已发布的应用程序。
请按照以下步骤在流程应用程序中导入自定义转换。
| 步骤 | 操作 |
|---|---|
|
1 |
打开 Process Mining 门户。 |
|
2 |
Go to the Process apps tab and locate the app for which you want to import the data transformations. |
|
3 |
如果您已将现有表的新输入表或新的输入字段添加到数据转换中,则必须在导入数据转换之前上传新的数据集。
单击 |
系统将导入并运行转换,新数据将显示在流程应用程序中。
- 简介
- 版本控制转换
- 先决条件
- Customizing the transformations
- 1. Export the transformations from the process app
- 2. Open the transformations in Visual Studio Code
- Date and time formats
- 3. Run the transformations
- 在开始之前
- 设置 Profiles.yml
- Running the transformations
- 4. Edit the transformations
- 5. Test the transformations on a local test environment
- 6. Import and test the transformations in a test process app in Process Mining
- 7. Import the transformations in the process app