Exercise 2: Working with batch jobs

複雑性: 初級 データ要件: ArcGIS Tutorial Data for Desktop データ パス: C:\ArcGIS\ArcTutor\DataReviewer 目的: To create a batch job and view the results once it is run.

ArcGIS Data Reviewer for Desktop extension contains more than 40 automated checks that can be configured to validate your data. Checks can be configured to run one at a time by choosing a check from the Select a Check drop-down list on the Data Reviewer toolbar.

Data Reviewer also offers the ability to configure and store multiple checks using batch jobs. The batch job can be thought of as a quality control model, a way to encapsulate and distribute quality control and validation information. The batch job allows users in different locations to utilize a consistent set of automated checks when validating their data. In this exercise, you are going to learn how to create and run a batch job using the Batch Job Manager and Batch Validate tools.

Exercise 2a: Adding a check

Checks are configured in a batch job using the Batch Job Manager. You can create groups in which you can store checks that apply to different aspects of your database. For example, in one group, you can have checks that are used to validate the attributes for a specified feature class, and in a different group, you can have checks for validating the geometry of features.

In the data, both points and polygons are used to represent important facilities. Any time a point and polygon represent the same location, both features should have the same name. The Geometry on Geometry check will be configured to find a point that is within a polygon where the name of the point is different from the name of the polygon.

手順:
  1. Ensure that ArcMap is open and the Reviewer.mxd has been loaded.
  2. Click the Reviewer Session Manager button Reviewer Session Manager on the Data Reviewer toolbar.

    The Reviewer Session Manager dialog box appears.

  3. Make sure that Reviewer.gdb is set as the Reviewer workspace.

    The Reviewer.gdb is located in the Reviewer directory where the sample data has been copied.

  4. Click New next to the ID drop-down list.
  5. Type Exercise 2 in the Name text box.

    Reviewer Session Manager dialog box

  6. Click Start Session.

    The button name changes to End Session.

  7. Click Close.

    The Reviewer Session Manager dialog box closes, and the Reviewer tools use the current session when writing to the Reviewer table.

  8. Click the Reviewer Batch Job Manager button Reviewer Batch Job Manager on the Data Reviewer toolbar.

    The Reviewer Batch Job Manager dialog box appears.

    The Reviewer Batch Job Manager dialog box

  9. Right-click in the empty space in the upper box of the Reviewer Batch Job Manager dialog box and click New Group.

    A node called Group 1 is added to the tree.

  10. Select the Group 1 node and press the F2 key.
  11. Type Geometry Checks for the new node name.
  12. Right-click the Geometry Checks node and click Add Check Feature on Feature Checks Geometry on Geometry Check.
    Adding the Geometry on Geometry check

    The Geometry on Geometry Check Properties dialog box appears.

  13. Type Point in landmark with different name in the Check Title text box.
  14. In the Feature Class 1 area of the dialog box, click the Feature Class/Subtype drop-down arrow and choose Schools.

    The schools are going to be compared to the landmark areas to ensure the names are the same.

  15. In the Feature Class 2 area of the dialog box, click the Feature Class/Subtype drop-down arrow and choose LandmarkAreas.

    The landmark areas and the school names are going to be compared to ensure they have the same name.

  16. Click the Type drop-down arrow in the Spatial Relation Check area and choose Within.
    Geometry on Geometry Check Properties dialog box
  17. On the Geometry on Geometry Check Properties dialog box, scroll down so you can see the rest of the properties.
  18. In the Attributes area of the dialog box, choose the Compare Attributes option.
  19. Click Select Attributes.

    The Compare Attributes dialog box appears.

  20. Click the Data Source 1 Attribute drop-down arrow and choose NAME.
  21. Click the Operator drop-down arrow and choose <>.
  22. Click the Data Source 2 Attribute drop-down arrow and choose NAME.
  23. Click Add.

    Compare Attributes dialog box

  24. [OK] をクリックします。
  25. Type a value in the Notes text box such as Point is within a Landmark Area with a different name.
  26. If necessary, click the Severity drop-down arrow and change the value.

    Second half of the properties on the Geometry on Geometry Check dialog box

  27. Click OK.

    The Point in landmark with different name node is added to the tree.

  28. Optionally, steps 12–27 can be repeated for all the point layers in the map (Cemeteries, GolfCourses, Buildings, and Hospitals). When repeating step 14, replace Schools with the appropriate point layer.

Exercise 2b: Duplicating a check

When creating multiple checks with similar properties, the Batch Job Manager allows you to duplicate the parameters of the check and assign different feature classes. For this portion of the exercise, you are going to validate the attributes of a feature with the Execute SQL check and duplicate the check for other feature classes.

手順:
  1. Right-click in the empty space in the upper box of the Reviewer Batch Job Manager dialog box and click New Group.

    A node called Group 2 is added to the tree.

  2. Select the Group 2 node and press the F2 key.
  3. Type Attribute Checks to rename the node.
  4. Right-click the Attribute Checks node and click Add Check Table Checks Execute SQL Check.
    Adding an Execute SQL check

    The Execute SQL Check Properties dialog box appears.

  5. Type Name is not populated in the Check Title text box.
  6. Click the Feature Class/Subtype drop-down arrow and choose MajorRoads.

    Execute SQL Check Properties dialog box

  7. Click SQL next to the Where Clause field.

    The Select Features Using a Query dialog box appears.

  8. Configure the query by doing the following:
    1. Click NAME in the Fields list, then click Add.
    2. Type IS NULL in the Where Clause text box.
    3. Click Or in the Operators area.
    4. Click NAME in the Fields list, then click Add.
    5. Click the = button in the Operators area.
    6. In the Where Clause text box, type ''.

      This is an open single quote mark and a closed single quote mark.

      When finished, the Where Clause text box should look like the following:

      Select Features Using a Query dialog box

  9. [OK] をクリックします。
  10. Type a value in the Notes text box such as Name MUST be populated.
  11. If necessary, click the Severity drop-down arrow and change the value.
  12. Click OK.

    The Name is not populated node is added to the tree.

  13. Right-click the Name is not populated node and click Duplicate Check.

    The Duplicate Check Generator dialog box appears.

  14. Check the check boxes next to the feature classes/tables for which you want to duplicate the check.
    ヒントヒント:

    You can click Select All to check all the feature classes.

    注意注意:

    Make sure that CoastalWater, MajorRoads, and States are not checked.

    Duplicate Check Generator dialog box
  15. Click OK.

    A new group named Output of Duplicate is added to the tree. A Name is not populated node is added as a child to the Output of Duplicate node for each feature class that was chosen on the Duplicate Check Generator dialog box.

    Checks added after using the Duplicate Check Generator

  16. In the tree, while pressing and holding the SHIFT key, select all the checks under the Output of Duplicate node.
  17. Click and drag the checks so they appear under the Attribute Checks node.
  18. Right-click the Output of Duplicate node and click Delete Group.
  19. Click Yes on the Delete Group message.
    Duplicated checks in the Attribute Checks group

Exercise 2c: Saving the batch job

Once you are finished adding all the checks to the batch job, it can be saved and distributed. When the batch job is saved, it is stored as a Reviewer batch job (.rbj) file.

手順:
  1. Click Save As on the Reviewer Batch Job Manager dialog box.

    The Save As dialog box appears.

  2. Navigate to the location where you copied the Reviewer directory for the sample data, such as the C:\ArcGIS\ArcTutor\DataReviewer directory and type a name for the batch job such as Reviewer.rbj.
  3. Click Save.

    The Reviewer Batch Job Manager dialog box appears.

  4. Click OK on the Reviewer Batch Job Manager dialog box to close it.

Exercise 2d: Running the batch job with Reviewer Batch Validate

One way to validate your data against the checks configured in your batch job is to run Reviewer Batch Validate. Reviewer Batch Validate allows you to choose which checks from the batch job will be run and choose the features you want to run the checks on (Selection Set, Current Extent, Definition Query, Full Database, or Changed Features if you are using SDE data).

手順:
  1. Ensure that the extent of the map is zoomed to the Batch Validate Extent bookmark by clicking Bookmarks Batch Validate Extent on the Main Menu toolbar.
  2. Click the Reviewer Batch Validate button Reviewer Batch Validate on the Data Reviewer toolbar.

    The Batch Validate dialog box appears.

  3. Click Add from File.

    The Select Batch Job File dialog box appears.

  4. Navigate to and choose the .rbj you created in Saving the batch job and click Open.

    The Batch Jobs area is populated with checks from the batch job.

  5. Uncheck the check box next to the Attribute Checks node.

    These checks are not selected to run.

  6. Ensure that the Current Extent option is chosen in the Features to Validate area.
  7. Click Validate All.

    The configuration of the batch job is validated to ensure there are no errors. A Default node is added to the top of the Batch Jobs tree. This node contains an Invalid Geometry Check for each feature class used in a selected check that also appears in the current extent. Default checks cannot be disabled through Reviewer Batch Validate but are managed through the Reviewer Session Manager by clicking Advanced.

    The Batch Validate dialog box with a batch job loaded

  8. Click Run.

    The selected checks will be run on the data in the current extent. A progress dialog box appears, and when the checks are finished running, a Table Writer message appears indicating how many errors have been found.

  9. [OK] をクリックします。
  10. Click the Reviewer Table button Reviewer Table on the Data Reviewer toolbar.

    The Reviewer Table window appears. Ensure that the Reviewer table is docked at the bottom of ArcMap and adjust the height so you can see some of the records.

  11. Double-click a record.

    The feature associated with the record is selected and the extent is panned to the extent of the point feature. To see that this feature is in error, use the Identify tool on the Tools toolbar to view the attributes of the point. The name field of the LandmarkArea features is used as the label so you can see that the names do not match.

  12. Scroll the Reviewer table over to see the values for the record.

    Notice that the ORIGINCHECK and PARAMETERS fields are populated with information from the check you configured. The ObjectId of the feature appears in the OBJECTID field, and the name of the feature class appears in the ORIGINTABLE field. Also notice that the session user name appears in the REVIEWTECHNICIAN field.

    Reviewer table with batch job results
  13. Click the Reviewer Session Manager button Reviewer Session Manager on the Data Reviewer toolbar.

    The Reviewer Session Manager dialog box appears.

  14. Click End Session.

    The Reviewer session ends, and the button name changes to Start Session.

  15. Click Close.

    The Reviewer Session Manager dialog box closes.

In this exercise, you created a batch job by configuring and duplicating checks, then ran the batch job and recorded the results in the Reviewer table. In Exercise 3, you can learn more about running batch jobs with the Reviewer service.

9/14/2013