执行检查器批处理作业 (Data Reviewer)

许可等级:BasicStandardAdvanced

摘要

运行工作空间中的检查器批处理作业并将结果写入检查器会话中。检查器批处理作业包含多组检查器校验。检查根据条件、规则和空间关系验证数据。检查还指定要验证的多组要素或行。检查器会话存储检查器校验执行的验证任务的相关信息。此信息存储在检查器工作空间的表和数据集中。

用法

语法

ExecuteReviewerBatchJob_Reviewer (reviewer_workspace, session, batch_job_file, {production_workspace}, {analysis_area}, {changed_features})
参数说明数据类型
reviewer_workspace

检查器批处理作业结果将写入的工作空间。

Workspace
session

检查器会话的标识符和名称。会话必须存在于检查器工作空间中。

String
batch_job_file

将要执行的检查器批处理作业文件的路径。

File
production_workspace
(可选)

要运行检查器批处理作业的生产数据库。如果此参数指向企业级地理数据库 (ArcSDE),那么请验证连接文件 (.sde) 是否引用了正确的地理数据库版本。

Workspace
analysis_area
(可选)

将用于构建验证处理区域的面要素。

Feature Layer
changed_features
(可选)

指示在生产工作空间引用 ArcSDE 中的数据时要进行验证的要素类型(无论是否更改)。

  • CHANGED_FEATURES仅验证从父版本更改为子版本的要素。
  • ALL_FEATURES验证批处理作业引用的数据中的所有要素。这是默认设置。
Boolean

代码实例

ExecuteReviewerBatchJob 示例(Python 窗口)

以下 Python 窗口脚本演示了如何使用执行检查器批处理作业 (ExecuteReviewerBatchJob) 工具。

# Path to the tutorial reviewer workspace
rev_workspace = "C:/gisdata/TutorialsSamples/Tutorials/Reviewer/Reviewer.sde"

# path to the tutorial batch job file
batch_job_file = "C:/gisdata/TutorialsSamples/Tutorials/Reviewer/BatchJobs/RevTutorial.rbj"

# session - must exist before executing this script.
session = "Session 2 : Session 2"

# path to the tutorial production workspace - this contains the data to validate
prod_workspace = "C:/gisdata/TutorialsSamples/Tutorials/Reviewer/California.sde"

# execute the batch job
res = arcpy.ExecuteReviewerBatchJob_Reviewer(rev_workspace,session,batch_job_file,prod_workspace)

# get the output table view from the result object
tbl = res.getOutput(0)

print tbl.name # prints REVBATCHRUNTABLE
ExecuteReviewerBatchJob 示例 2(独立脚本)

此独立脚本演示了如何使用执行检查器批处理作业 (ExecuteReviewerBatchJob) 工具。

# Name: ExecuteReviewerBatchJob_Example.py
# Description: Executes a reviewer batch job
# Requirements: Production Mapping extension

# Import arcpy module
import arcpy

# Check out a Data Reviewer extension license
arcpy.CheckOutExtension("datareviewer")

arcpy.env.overwriteOutput="true"

# reviewer workspace
reviewer_db = "c:/gisdata/reviewer.sde"

# reviewer batch job file - corresponds to Finding geometries with spatial relationships doc
SoCal_GeoOnGeoChecks_rbj = "C:/gisdata/SoCal_GeoOnGeoChecks.rbj"

# session - must exist before executing this script.
session =  "Session 2 : Session 2"

# production database - contains data to validate
production_db = "C:/gisdata/Edit_Sample.sde"

# aoi feature layer
arcpy.MakeFeatureLayer_management(production_db + "/Features/PolbndA",'PolbndA',"objectid = 145")

# Execute Reviewer Batch Job function
res = arcpy.ExecuteReviewerBatchJob_Reviewer(reviewer_db, session, SoCal_GeoOnGeoChecks_rbj, production_db,'PolbndA')

# get the output table
tbl = res.getOutput(0)
print tbl.name

# query the table
for row in arcpy.da.SearchCursor(tbl,("RECORDID","BATCHJOBID","BATCHJOBFILE")):
    print str(row[0])
    print row[1]
    print row[2]

# Check in the Data Reviewer extension
arcpy.CheckInExtension("datareviewer")

环境

相关主题

许可信息

ArcGIS for Desktop Basic:需要 Data Reviewer
ArcGIS for Desktop Standard:需要 Data Reviewer
ArcGIS for Desktop Advanced:需要 Data Reviewer
9/15/2013