Execute Reviewer Batch Job (Data Reviewer)

Niveau de licence :BasicStandardAdvanced

Récapitulatif

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.

Utilisation

Syntaxe

ExecuteReviewerBatchJob_Reviewer (reviewer_workspace, session, batch_job_file, {production_workspace}, {analysis_area}, {changed_features})
ParamètreExplicationType de données
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
(Facultatif)

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

Workspace
analysis_area
(Facultatif)

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

Feature Layer
changed_features
(Facultatif)

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

  • CHANGED_FEATURESValidates only features that changed from the parent to the child version.
  • ALL_FEATURESValidates all features in the data referenced by the batch job. This is the default.
Boolean

Exemple de code

ExecuteReviewerBatchJob example (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")

Environnements

Thèmes connexes

Informations de licence

ArcGIS for Desktop Basic: Requis Data Reviewer
ArcGIS for Desktop Standard: Requis Data Reviewer
ArcGIS for Desktop Advanced: Requis Data Reviewer
4/26/2014