- 发行说明
- 在开始之前
- 入门指南
- 管理访问权限
- 使用流程应用程序
- 创建流程应用程序
- 正在加载数据
- 自定义流程应用程序
- 数据转换
- TemplateOne 应用程序模板
- “购买到付款”应用程序模板
- “订单到现金”应用模板
- 基本故障排除指南
The information in this page is based on CData Sync 2022 - 22.0.8342.0. If you use an other version of CData Sync, field names or functions may be different.
简介
CData Sync 工具用于将源系统中的数据提取到Process Mining中。受支持的源系统可以在 CData Sync 网站上的“源”页面上找到。有关 CData Sync 的更多信息,请参阅CData Sync 官方网站。
本页面介绍了如何使用 CData Sync 将源系统中的数据加载到内部部署 Process Mining (Automation Suite) 中的流程应用程序中。
先决条件
假设您已经:
-
有效的 CData 同步许可证。
-
已安装 CData Sync。请参阅安装 CData Sync 。
-
设置具有正确权限的 SQL Server 访问权限。请参阅
数据假名化
使用 CData Sync,可以在提取过程中对数据字段进行假名化。 这样,可以在敏感数据字段到达 Process Mining 产品之前在源处对其进行散列处理。 请按照以下步骤对数据进行假名化。
-
转到 CData 中作业的所需任务。
-
编辑查询。
-
将
hashbytes()函数添加到需要匿名化的每个字段。 例如REPLICATE [SOURCE_TABLE] SELECT hashbytes('SHA2_256',[SOURCE_FIELD]) AS [DESTINATION_FIELD] FROM [SOURCE_TABLE];
这样,所有值都将使用SHA2 256哈希进行散列。有关更多信息,请参阅SHA-2 。如果需要,散列值可以转换为“人 1”、“人 2”、“人 3”等值。在数据转换中为此编写 SQL 查询。
使用 CData Sync 加载数据
使用 CData Sync 设置数据加载需要执行多个步骤。
- 设置源连接;
- 创建 SQL Server 目标连接;
- 创建作业;
- 调用数据提取 API;
- 正在运行作业。
下面将详细介绍这些步骤。
创建源连接
Refer to the Configuring CData Sync page for your app template for specific settings for setting up the source connection.
查看 CData 同步文档,了解源系统的任何特定设置或要求。
请按照以下步骤创建源连接。
-
在 CData Sync 管理控制台中,为源系统创建一个新的源连接。
备注:如果您的源系统不在列表中,您可以单击“+ 添加更多”以显示所有可用的源 CData Sync 连接器的列表。为源系统选择连接器,然后单击“下载并安装” 。
-
Enter a descriptive name for the source connection in the Name field.
-
输入所需属性以设置与源系统的连接。
-
创建并测试连接。
为 .csv 文件或 .tsv 文件设置源连接
如果要为 .csv 或 .tsv 文件设置源连接,请确保:
- 从列表中选择 CSV 作为要与其创建连接的源系统。
- 将URI设置为存储
.csv或.tsv文件的路径。 - 设置正确的连接类型。当文件与 CData Sync 存储在同一服务器上时,请使用“本地” 。
- 将FMT设置为数据文件中使用的适当值。
在“连接设置”面板的“高级”选项卡中定义以下设置,以确保将数据正确加载到Process Mining中。
| 版块 | 参数 | 值 |
|---|---|---|
| 其他 | Exclude File Extensions | True |
| 其他 | Include Files | 如果要上传.tsv文件,请将,TSV添加到设置中 |
| 架构 | Type Detection Scheme | None |
| 数据格式 | 将空值推送为 Null | True |
Retrieving the SQL Server database parameters
如要设置 SQL Server 目标连接,您需要 SQL Server 数据库的以下设置参数。
ServerDatabaseSchemaRole
创建目标连接
如要设置 SQL Server 目标连接,您需要 SQL Server 数据库的以下设置参数。
ServerDatabaseSchemaRole
请按照以下步骤创建 SQL Server 目标连接。
-
定义类型为SQL Server 的新连接。
-
Enter a descriptive name for the destination connection. For example SQLServer_IM.
-
配置设置以使用检索到的 SQL Server 数据库设置凭据连接到 SQL Server 数据库
备注:必须将“服务器”指定为<Server>,<Port> 。
备注:“用户”/“密码”必须是有权写入数据库的用户的 SQL 凭据。查看设置 SQL Server 帐户,以使用提取程序上传数据。密码不能包含分号
;。 -
创建并测试连接。
创建提取作业
请按照以下步骤创建提取作业。
- Click on JOBS in the menu bar and go to the Sources tab of the Add Connection panel.
- Click on + Create Job... to add a new job.
- Enter a descriptive name for the job in the Job Name field. For example, ServiceNow_to_SQLServer.
- Select the source connection created in Step 1: Setting up the source connection the source connection from the Source list.
- Select the SQL Server connection created in Step 3: Create destination connection from the Destination list.
- Make sure the option Standard is selected as the Replication Type and click on +Create.
- Click on +Add Tasks.
- 选择列表中的所有源表格。
- Click on Add.
- Go to the Advanced tab in the Job Settings panel.
- 找到“目标架构”条目,然后复制在“步骤 2:检索 SQL Server 数据库参数”中检索到的架构。
- Select the Drop Table option to prevent the data to be appended to the table.
- Enable the checkbox
Enable Parallel Processingand enter8in the Worker Pool field to improve loading speed. - 确保已设置“复制间隔”和“复制间隔单位”,以使生成的周期等于或大于提取周期。
- Click on Save Changes.
调用数据提取 API
请按照以下步骤编辑作业后事件以调用数据提取 API。
-
Go to the Events tab in the Job Settings panel.
-
编辑“作业后事件”部分并添加提取 API 调用,以确保如下所述替换服务器、组织、租户和Process Mining 应用程序 ID 。
备注:您可以从 Process Mining 门户的“所有流程应用程序” 列表中复制 应用程序 ID 。请确保在“列”列表中选择“ID” 。
替换 您用于替换的项 my-uipath-server.com服务器 default组织 defaulttenant租户 98dfd1d5-9e42-4f0e-9a0a-8945629f01b3应用程序 ID <api:set attr="http.url" value="https://my-uipath-server.com/default/defaulttenant/processMining_/api/v2/apps/98dfd1d5-9e42-4f0e-9a0a-8945629f01b3/transform/unauthenticated"/> <api:call op="httpPost" in="http"/><api:set attr="http.url" value="https://my-uipath-server.com/default/defaulttenant/processMining_/api/v2/apps/98dfd1d5-9e42-4f0e-9a0a-8945629f01b3/transform/unauthenticated"/> <api:call op="httpPost" in="http"/> -
保存更改。
-
Click on JOBS in the menu bar and locate the destination job.
-
Click on the Run All Queries icon to check if the job runs correctly.
记录的信息
您可以添加其他语句以获取有关 API 调用的日志记录信息。请执行以下步骤。
-
在之前在作业后事件中添加的行之间添加以下语句。
<api:set attr="http.verbosity" value="5"/><api:set attr="http.logfile" value="D:/mydir/cdata_log.txt"/>请参见下图。
-
Go to the Logging & History tab in the Job Settings panel.
-
Select Verbose from the Logfile Verbosity list box.
-
运行作业并检查创建的日志文件。
运行 CData Sync 提取作业
请按照以下步骤运行提取作业。
-
单击菜单栏中的“作业”,并找到在步骤 4:创建提取作业中创建的提取作业。
-
Click on the Run all queries icon. See the illustration below.
-
等待作业完成。 根据数据量,这可能需要几分钟。
-
转到Process Mining 门户并检查流程应用程序的“上次提取时间” ,以查看数据加载是否已成功完成。注意:仅在处理完所有数据后,系统才会更新日期。根据数据量,完成该操作可能需要几分钟到一个小时。
计划作业
如果要定期运行提取作业,可以使用 CData 同步计划程序定义计划。
请按照以下步骤计划提取作业。
-
Open the CData Sync extraction job created in Step 4: Creating the extraction job.
-
Go to the Schedule tab in the Job Settings panel.
有关如何计划作业的更多信息,请参阅官方 CData Sync 文档。