Data Reviewer のライセンスで利用可能。
- Example 1: Creating a new session in a database
- Example 2: Converting a database to a Reviewer workspace
- Example 3: Erasing Reviewer workspace information
- Example 4: Erasing Reviewer workspace information and creating a new session
- Example 5: Listing the sessions in a Reviewer workspace
- Example 6: Running a batch job on a workspace
- Example 7: Executing multiple batch jobs at the same time
- Example 8: Validating batch jobs without executing them
- Example 9: Listing the checks in one or more batch jobs
- Example 10: Merging two or more batch jobs into one
- Example 11: Executing a Data Reviewer service job file
The ReviewerConsole command is a command line executable that can be used to run or analyze Data Reviewer batch jobs. In addition, it provides capabilities that allow you to modify Reviewer administration tables and sessions and perform some miscellaneous functions such as merging multiple batch jobs into a single batch job and listing the contents of a batch job.
The following are examples of how to use the ReviewerConsole application to perform specific tasks, such as creating a batch job, creating a Reviewer session, and running a batch job.
Example 1: Creating a new session in a database
The pattern for creating a new session in a Reviewer workspace is the following:
ReviewerConsole /wks:<path to the workspace> /session:<session name> /create
The example below is going to create a session named Session 1 in the SoCal.mdb geodatabase. If the session exists, it will not be overwritten. If the specified workspace is not a Reviewer workspace, the Reviewer administration tables are added to it prior to creating the session.
ReviewerConsole.exe /wks:C:\Data\SoCal.mdb /session:"Session 1" /create
Example 2: Converting a database to a Reviewer workspace
The pattern for converting a geodatabase to a Reviewer workspace, which adds the Reviewer dataset and other administrative tables to an existing workspace, is the following:
ReviewerConsole.exe /wks:<path to the workspace> /create
In the example below, the workspace is specified by the Reviewer_RDBMS.sde connection properties file. As no path component is provided, the ReviewerConsole program will look for the file locally first, then in the C:\Documents and Settings\<user name>\Application Data\ESRI\Desktop10.3\ArcCatalog directory. If the account specified in the connection properties file has the relevant permissions, the Reviewer administration tables are created in the specified workspace.
ReviewerConsole.exe /wks:Reviewer_RDBMS.sde /create
Example 3: Erasing Reviewer workspace information
The pattern for erasing the Reviewer administrative tables from a database is as follows:
ReviewerConsole.exe /wks:<path to the workspace> /erase
In the example below, the Reviewer workspace administration tables are erased from the Reviewer.gdb database. This includes the session tables, error records, and so forth.
ReviewerConsole.exe /wks:"C:\Data\Reviewer.gdb" /erase
Example 4: Erasing Reviewer workspace information and creating a new session
The pattern for erasing the Reviewer workspace administrative tables and dataset and creating a new session is as follows:
ReviewerConsole.exe /wks:<path to the workspace> /session:<session name> /erase /create
In this example, a new Reviewer workspace is created using SoCal.mdb, replacing any existing Reviewer workspace information. A new session is also created.
ReviewerConsole.exe /wks:"C:\Data\SoCal.mdb" /session:"Session 1" /erase /create
When the /erase option is used, all the sessions in the Reviewer workspace are deleted before the new session is created. You cannot delete only the session specified in the /session: parameter, should it happen to exist. Use the /delete option to delete a single session.
Erasing the Reviewer workspace information and creating the new session is equivalent to this:
ReviewerConsole.exe /wks:"C:\Data\SoCal.mdb" /erase
ReviewerConsole.exe /wks:"C:\Data\SoCal.mdb" /session:"Session 1" /create
Example 5: Listing the sessions in a Reviewer workspace
The pattern for listing the Reviewer sessions in a Reviewer workspace is as follows:
ReviewerConsole.exe /wks:<path to the workspace> /list
In the example below, the Reviewer sessions present in the SoCal.mdb database are listed.
ReviewerConsole.exe /wks:"C:\Data\SoCal.mdb" /list
The output for the Reviewer session list resembles the following. The first column contains an identifier that corresponds with the session number, and the second column contains the name of the session.
Sessions for 'C:\Data\SoCal.mdb' ====== ========================= 1 Session 1 2 Session 2
Example 6: Running a batch job on a workspace
To run a batch job, you need to indicate a Reviewer workspace, the session that is going to store the results, and the path to the batch job. The pattern for this is the following:
ReviewerConsole /wks:<path to workspace> /session:<session name> /rbj:<path to the batch job> /exec
In this case, you are going to execute the TestGeoOnGeo.rbj batch job using the SoCalwErrors.mdb Reviewer workspace and write any error records into the Session 9 Reviewer session. It is assumed that the workspace connection information within the batch job is current.
ReviewerConsole.exe /wks:"C:\Data\SoCalwErrors.mdb" /session:"Session 9" /rbj:"C:\Data\Testing\
TestGeoOnGeo.rbj" /exec
Once the batch job has finished running, results similar to those shown below are written to the console:
[6/3/2008 4:28:36 PM] ArcGIS Data Reviewer Program v1.0.0.0 Runs or Analyzes ArcGIS Data Reviewer Batch Jobs 6/3/2008 4:28:43 PM, Level: Normal, Message: Setting session 'Session 9' active Creating RevServiceJob[0] There are 1 errors to write for job [0] 6/3/2008 4:29:01 PM, Level: Normal, Message: 1 new records written to Reviewer table Job[0] Summary Report =================================== Run Number: 0 Workspace: SoCalwErrors.mdb Session Name: Session 9 Default checks from 'Session 9' processed. Batch Jobs: C:\ Data\Testing\TestGeoOnGeo.rbj Filter: none RevCheck Validation Summary: Total checks validated (from all batch jobs): 2 (Total Good 2, Total Error 0, Total Warning 0) Batch Job 'TestGeoOnGeo' Status: Total checks 2 (Good 2, Error 0, Warning 0) Execution Summary: Total checks executed (not including default checks): 2 Execution started: 6/3/2008 4:28:49 PM Execution complete: 6/3/2008 4:29:05 PM Execution duration: 00h 00m 15s Execution results: Total errors: 1 New Errors: 1 Duplicate Errors:0
Example 7: Executing multiple batch jobs at the same time
The pattern for executing multiple batch jobs at the same time is as follows:
ReviewerConsole.exe /wks:<path to the workspace> /session:<session name> /rbj:<path to batch job 1>,<path to batch job 2>,<path to batch job n> /exec
In this example, a list of batch jobs is executed. ReviewerConsole will construct a single batch job internally that contains all the checks from all the specified batch jobs. This merged batch job is then executed using the SoCalwErrors Reviewer workspace and Session 9.
ReviewerConsole.exe /wks:"C:\Data\SoCalwErrors.mdb" /session:"Session 9" /rbj:"C:\Data\Testing\
TestGeoOnGeo.rbj","C:\Data\SoCal_DomainChecks.rbj" /exec
Example 8: Validating batch jobs without executing them
The pattern for validating batch jobs is as follows:
ReviewerConsole.exe /wks:<path to the workspace> /session:<session name> /rbj:<path to batch job 1>,<path to batch job 2><path to batch job n> /validate
In this example, batch validation (similar to the Validate functionality on the Reviewer Batch Validate dialog box) will be run without executing the checks. This ensures that the paths to the feature classes and tables referenced by the checks in the batch jobs have valid workspace paths. The results of validation are written to the console. A Reviewer workspace and session must be specified.
ReviewerConsole.exe /wks:"REVIEWER ON_SQLServer.sde" /session:"Session 4" /rbj:"C:\Data\Testing\TestGeoOnGeo.rbj","C:\SoCal_DomainChecks.rbj","C:\Data\RunInvalidGeom.rbj" /validate
Once the batch job validation is complete, results similar to those shown below are written to the console:
Validation Report =================================== Workspace: null Session Name: null Batch Jobs processed: C:\Data\Testing\SoCal_GeoOnGeoChecks.rbj Batch Jobs processed: C:\Data\Testing\TestGeoOnGeo.rbj, C:\Data\Testing\SoCal_DomainChecks.rbj Batch Jobs processed: C:\Data\RunInvalidGeom.rbj RevCheck Validation Summary: Total checks validated (from all batch jobs): 24 (Total Good 24, Total Error 0, Total Warning 0) Batch Job 'SoCal_GeoOnGeoChecks' Status: Total checks 4 (Good 4, Error 0, Warning 0) Batch Job 'socal_domainchecks' Status: Total checks 20 (Good 20, Error 0, Warning 0) Batch Job 'RunInvalidGeom' Status: Total checks 20 (Good 20, Error 0, Warning 0)
Example 9: Listing the checks in one or more batch jobs
The pattern for listing the checks in batch jobs is the following:
ReviewerConsole /rbj:<path to batch job 1>,<path to batch job 2> <path to batch job n>/list
When the contents of the batch job are listed, information includes the user name of the person who created the batch job, when it was created, and when it was last edited and by whom.
With each check in the batch job, you are provided with the following information:
- Group: The name of the group that contains the check in the batch job
- Check[number]: The number of the check, based on its order in the batch job
- Name: The name of the check
- Description: A description of the check, as provided in the dialog box
- Category: The check category in which the check is contained
- Resources: The names of the workspaces that contain the feature classes on which the check is run (The primary resource is the Feature Class 1 in the check. The secondary resources are Feature Class 2 and 3 in the check.)
The output for the list of checks in batch jobs resembles the following:
RevBatchJob: 'c:\testdata\batch_jobs\test_spatial2.rbj' ================================================================= Name: C:\TestData\Batch_Jobs\Test_spatial2.rbj CreatedBy: Editor CreationDate: Wednesday, May 14, 2008 LastEditDate: Wednesday, May 14, 2008 LastEditedBy: Editor Count Checks: 5 Group: BuiltUpA Check[0]: Name: Evaluate Polygon Perimeter and Area Check Description: Returns polygon, part, ring, or segment geometries for polygon features where the area or perimeter is within specified parameters. Category: Polygon Checks Resources: Primary: BuiltupA, ReviewerRTFeatureClass Check[1]: Name: Intersection on Geometry Check Description: Returns geometries for features in Feature Class 3 that intersect with the intersections of features from Feature Class 1 and 2 Category: Feature on Feature Checks Resources: Primary: BuiltupP, ReviewerRTFeatureClass Secondary[0]: RoadL, ReviewerRTFeatureClass Secondary[0]: BridgeL, ReviewerRTFeatureClass Group: GrassA Check[0]: Name: Evaluate Polygon Perimeter and Area Check Description: Returns polygon, part, ring, or segment geometries for polygon features where the area or perimeter is within specified parameters. Category: Polygon Checks Resources: Primary: BuiltupA, ReviewerRTFeatureClass Check[1]: Name: Evaluate Extent Check Description: Returns features where the extent properties (X and Y) are within specified parameters. Category: Spatial Parameter Evaluation Checks Resources: Primary: GrassA, ReviewerRTFeatureClass
Example 10: Merging two or more batch jobs into one
The pattern for merging several batch jobs is as follows:
ReviewerConsole.exe /rbj:<path to batch job 1>,<path to batch job 2>,<path to batch job n> /merge:<path to storage location and name of merged batch job.rbj>
You need to specify a comma-delimited set of batch jobs to be merged along with the target output batch file. If the batch file already exists, it will be overwritten.
In the example below, the SoCal_GeoOnGeoChecks.rbj, SoCal_DomainChecks.rbj, and SoCal_SubtypeChecks.rbj batch jobs are merged into the RevService.rbj batch job file.
ReviewerConsole.exe /rbj:c:\TestData\RevService\SoCal_GeoOnGeoChecks.rbj,c:\TestData\RevService\SoCal_DomainChecks.rbj,C:\TestData\RevService\SoCal_SubtypeChecks.rbj /merge:RevService.rbj
Example 11: Executing a Data Reviewer service job file
The Data Reviewer service is a Windows service that runs Reviewer batch jobs that are scheduled for execution (by the service) within an XML-formatted job configuration file or job. These same jobs can also be run by the ReviewerConsole program.
A Data Reviewer service job file contains the name of the workspace, the name of the session, and the batch jobs to execute as well as scheduling information as to when and how frequently the job will be run. Essentially, the ReviewerConsole program ignores the scheduling information and executes the specified batch jobs using the specified workspace and session in the job file.
To execute a Reviewer service job, the pattern is as follows:
ReviewerConsole.exe /job:<path to the Reviewer service job file>
In the example below, the service_job1.xml file is run. The output to the console resembles the following:
ReviewerConsole.exe /job:"C:\TestData\RevService\ service_job1.xml" 6/9/2008 3:08:52 PM, Level: Normal, Message: Setting session 'Session 1' active Creating RevServiceJob[0] No errors to write for session 'Session 1' for job [0] Job[0] Summary Report =================================== Run Number: 0 RevServiceJob: c:\testdata\revservice\service_job1.xml Workspace: RevService.mdb Session Name: Session 1 Batch Jobs: C:\TestData\RevService\Simple_Test.rbj Filter: none RevCheck Validation Summary: Total checks validated (from all batch jobs): 1 (Total Good 1, Total Error 0, Total Warning 0) Batch Job 'Simple_Test' Status: Total checks 1 (Good 1, Error 0, Warning 0) Execution Summary: Total checks executed (not including default checks): 1 Execution started: 6/9/2008 3:08:53 PM Execution complete: 6/9/2008 3:13:33 PM Execution duration: 00h 04m 40s Execution results: Total errors: 0 New Errors: 0 Duplicate Errors:0