ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

Execute Reviewer Batch Job

Available with Data Reviewer license.

  • Summary
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

Summary

Runs a Reviewer batch job on a workspace and writes the results to a Reviewer session. A Reviewer batch job contains groups of Reviewer checks. Checks validate data based on conditions, rules, and spatial relationships. Checks also specify sets of features or rows to validate. A Reviewer session stores information about validation tasks performed by Reviewer checks. This information is stored in a table and a dataset in the Reviewer workspace.

Usage

  • If the specified workspace is not a Reviewer workspace, the tool will display error 090034, Selected workspace is not a Reviewer Workspace. The workspace does not have all required reviewer tables. Use the Reviewer Session Manager to create a Reviewer workspace.

  • If Reviewer Workspace was created by an earlier version of the Data Reviewer and has not been upgraded, the tool will display error 090036, This is an older version of Reviewer workspace. Use the Reviewer Session Manager to upgrade the workspace.

  • Session references a preexisting session ID and name in the Reviewer Workspace. Executing the tool with an invalid session will return error 090062, Session value is not correct.

  • You can create a session with the Create Reviewer Session tool. Create Reviewer Session generates a session ID and name as an output parameter.

  • Reviewer batch jobs can only be created in ArcMap.

  • The Reviewer batch job results are written to the specified session (indicated by Session) in the Reviewer Workspace.

  • If you use a batch job file created by a 9.2 version of Data Reviewer, the tool will display error 090035, This is an older version of Reviewer Batch Job.

  • Production Workspace contains data to validate with Reviewer checks defined in Batch Job File. If this parameter points to an enterprise geodatabase, verify that the connection file (.sde) references the correct geodatabase version.

  • If a workspace is not defined in the Production Workspace parameter, the batch job runs on the workspace defined in Batch Job File.

  • If the production workspace is an enterprise geodatabase, you can validate data in a particular version using the Production Workspace Version parameter.

  • Analysis Area contains polygon features that will be unioned to create the processing area. Features that intersect this area will be validated by the Reviewer batch job. Features outside this area will not be validated.

  • Changed Features Only is enabled when the Production Workspace references an enterprise geodatabase. This setting limits validation to those features that have changed from the parent to child version and only applies to a check's primary feature class (Feature Class 1). All features in secondary data resources (Feature Class 2+) are used in the validation. Changes between versions include the following:

    • Features inserted in the child version but not the parent
    • Features changed in the child version and unchanged in the parent
    • Features changed in both child and parent versions
    • Features changed in the child version and deleted in the parent
  • A summary of the batch job is displayed in the Results window.

  • The output parameter for this tool is a table view of one row of the REVBATCHRUNTABLE table in the Reviewer Workspace. The row represents the record created when the batch job is executed. The following table describes possible values in the RUNCONTEXT and STATUS fields in REVBATCHRUNTABLE.

    FieldDescription

    RUNCONTEXT

    The code that identifies the context in which the batch job was run:

    • 0 – Desktop
    • 1 – Engine
    • 2 – Server

    STATUS

    Batch job execution status code:

    • 0 – Successful

      Batch Job executed successfully.

    • 1 – Successful with Errors

      Batch Job executed successfully with errors. Processing errors are usually associated with either a check failing validation (data source not available, misconfigured check) or a feature being skipped for validation due to issues with the feature.

    • 2 – Successful with Warnings

      Batch Job executed successfully with warnings. Processing warnings are usually associated with the inability to build error geometries for results and other issues that are not significant to the proper execution of the batch job.

    • 3 – Successful with Errors and Warnings

      Batch Job executed successfully with both warnings and errors as outlined above.

    • 4 – Failed

      Batch Job did not execute successfully. A failed batch job occurs when all checks in the batch job failed validation due to either data access or configuration issues.

  • A log file with the results can be found in the %appdata%\ESRI\DataReviewer<version>\Desktop directory. Information in the log file includes which checks have been run on a feature class, the number of features validated, and the number of results reported. Server processing errors and warnings can be examined by reviewing the server Jobs directory for the geoprocessing batch job service.

Syntax

ExecuteReviewerBatchJob_Reviewer (reviewer_workspace, session, batch_job_file, {production_workspace}, {analysis_area}, {changed_features}, {production_workspaceversion})
ParameterExplanationData Type
reviewer_workspace

The workspace where the Reviewer batch job results are written.

Workspace
session

The identifier and name for a Reviewer session. The session must exist in the Reviewer workspace.

String
batch_job_file

The path to the Reviewer batch job file to be executed.

File
production_workspace
(Optional)

The production database on which you want to run the Reviewer batch job. If this parameter points to an enterprise geodatabase, verify that the connection file (.sde) references the correct geodatabase version.

Workspace
analysis_area
(Optional)

Polygon features that will be used to build a validation processing area.

Feature Layer
changed_features
(Optional)

Indicates the type of features, changed or unchanged, to validate when the production workspace references data in ArcSDE.

  • CHANGED_FEATURES —Validates only features that changed from the parent to the child version.
  • ALL_FEATURES —Validates all features in the data referenced by the batch job. This is the default.
Boolean
production_workspaceversion
(Optional)

The version of the production workspace to be validated by the batch job. This is only applicable when the production workspace is an enterprise geodatabase.

String

Code sample

ExecuteReviewerBatchJob example 1 (Python window)

The following Python window script demonstrates how to use the ExecuteReviewerBatchJob tool.

# 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 example 2 (stand-alone script)

This stand-alone script demonstrates how to use the ExecuteReviewerBatchJob tool.

# 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")

Environments

  • Current Workspace

Licensing information

  • ArcGIS Desktop Basic: Requires Data Reviewer
  • ArcGIS Desktop Standard: Requires Data Reviewer
  • ArcGIS Desktop Advanced: Requires Data Reviewer

Related topics

  • An overview of the Data Reviewer toolbox
  • A quick tour of Data Reviewer
  • Starting a Reviewer session in a nonenterprise geodatabase
  • Starting a Reviewer session in an enterprise geodatabase

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2019 Esri. | Privacy | Legal