UiPath Documentation
process-mining
2022.10
false
Process Mining
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。

使用 CData Sync 加载数据

备注:

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 Sync,可以在提取过程中对数据字段进行假名化。 这样,可以在敏感数据字段到达 Process Mining 产品之前在源处对其进行散列处理。 请按照以下步骤对数据进行假名化。

  1. 转到 CData 中作业的所需任务。

  2. 编辑查询。

  3. 将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 设置数据加载需要执行多个步骤。

  1. 设置源连接;
  2. 创建 SQL Server 目标连接;
  3. 创建作业;
  4. 调用数据提取 API;
  5. 正在运行作业。

下面将详细介绍这些步骤。

创建源连接​

备注:

Refer to the Configuring CData Sync page for your app template for specific settings for setting up the source connection.

备注:

查看 CData 同步文档,了解源系统的任何特定设置或要求。

请按照以下步骤创建源连接。

  1. 在 CData Sync 管理控制台中,为源系统创建一个新的源连接。

    备注:

    如果您的源系统不在列表中,您可以单击“+ 添加更多”以显示所有可用的源 CData Sync 连接器的列表。为源系统选择连接器,然后单击“下载并安装” 。

  2. Enter a descriptive name for the source connection in the Name field.

  3. 输入所需属性以设置与源系统的连接。

  4. 创建并测试连接。

为 .csv 文件或 .tsv 文件设置源连接​

如果要为 .csv 或 .tsv 文件设置源连接,请确保:

  • 从列表中选择 CSV 作为要与其创建连接的源系统。
  • 将URI设置为存储.csv或.tsv文件的路径。
  • 设置正确的连接类型。当文件与 CData Sync 存储在同一服务器上时,请使用“本地” 。
  • 将FMT设置为数据文件中使用的适当值。

在“连接设置”面板的“高级”选项卡中定义以下设置,以确保将数据正确加载到Process Mining中。

版块参数值
其他Exclude File ExtensionsTrue
其他Include Files如果要上传.tsv文件,请将,TSV添加到设置中
架构Type Detection SchemeNone
数据格式将空值推送为 NullTrue

Retrieving the SQL Server database parameters​

如要设置 SQL Server 目标连接,您需要 SQL Server 数据库的以下设置参数。

  • Server
  • Database
  • Schema
  • Role

创建目标连接​

如要设置 SQL Server 目标连接,您需要 SQL Server 数据库的以下设置参数。

  • Server
  • Database
  • Schema
  • Role

请按照以下步骤创建 SQL Server 目标连接。

  1. 定义类型为SQL Server 的新连接。

  2. Enter a descriptive name for the destination connection. For example SQLServer_IM.

  3. 配置设置以使用检索到的 SQL Server 数据库设置凭据连接到 SQL Server 数据库

    备注:

    必须将“服务器”指定为<Server>,<Port> 。

    备注:

    “用户”/“密码”必须是有权写入数据库的用户的 SQL 凭据。查看设置 SQL Server 帐户,以使用提取程序上传数据。密码不能包含分号; 。

  4. 创建并测试连接。

创建提取作业​

重要提示:

输入数据必须符合用于创建流程应用程序的应用程序模板所需的格式。请参阅应用程序模板。

确保为表名称添加后缀_raw 。

请按照以下步骤创建提取作业。

  1. Click on JOBS in the menu bar and go to the Sources tab of the Add Connection panel.
  2. Click on + Create Job... to add a new job.
  3. Enter a descriptive name for the job in the Job Name field. For example, ServiceNow_to_SQLServer.
  4. Select the source connection created in Step 1: Setting up the source connection the source connection from the Source list.
  5. Select the SQL Server connection created in Step 3: Create destination connection from the Destination list.
  6. Make sure the option Standard is selected as the Replication Type and click on +Create.
  7. Click on +Add Tasks.
    • 选择列表中的所有源表格。
    • Click on Add.
  8. 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 Processing and enter 8in the Worker Pool field to improve loading speed.
    • 确保已设置“复制间隔”和“复制间隔单位”,以使生成的周期等于或大于提取周期。
  9. Click on Save Changes.

调用数据提取 API​

请按照以下步骤编辑作业后事件以调用数据提取 API。

  1. Go to the Events tab in the Job Settings panel.

  2. 编辑“作业后事件”部分并添加提取 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"/>
    

  3. 保存更改。

  4. Click on JOBS in the menu bar and locate the destination job.

  5. Click on the Run All Queries icon to check if the job runs correctly.

记录的信息​

您可以添加其他语句以获取有关 API 调用的日志记录信息。请执行以下步骤。

  1. 在之前在作业后事件中添加的行之间添加以下语句。

    <api:set attr="http.verbosity" value="5"/>

    <api:set attr="http.logfile" value="D:/mydir/cdata_log.txt"/>

    请参见下图。

  2. Go to the Logging & History tab in the Job Settings panel.

  3. Select Verbose from the Logfile Verbosity list box.

  4. 运行作业并检查创建的日志文件。

运行 CData Sync 提取作业​

请按照以下步骤运行提取作业。

  1. 单击菜单栏中的“作业”,并找到在步骤 4:创建提取作业中创建的提取作业。

  2. Click on the Run all queries icon. See the illustration below.

  3. 等待作业完成。 根据数据量,这可能需要几分钟。

  4. 转到Process Mining 门户并检查流程应用程序的“上次提取时间” ,以查看数据加载是否已成功完成。注意:仅在处理完所有数据后,系统才会更新日期。根据数据量,完成该操作可能需要几分钟到一个小时。

计划作业​

如果要定期运行提取作业,可以使用 CData 同步计划程序定义计划。

请按照以下步骤计划提取作业。

  1. Open the CData Sync extraction job created in Step 4: Creating the extraction job.

  2. Go to the Schedule tab in the Job Settings panel.

有关如何计划作业的更多信息,请参阅官方 CData Sync 文档。

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新