Create Reviewer Session (Data Reviewer)

Summary

Creates a new Reviewer session in a specified workspace.

Legacy:

ArcMap-based Reviewer workflows will soon be deprecated. It is recommended that current users begin converting their workflows from Reviewer batch jobs to Data Reviewer attribute rules.

Learn more about migrating to attribute rules

Usage

  • The input workspace must be a Reviewer workspace. Use the Enable Data Reviewer tool to create a Reviewer workspace.

  • The input workspace must contain the current version of the Reviewer schema. If it does not, use the Enable Data Reviewer tool to upgrade the workspace.

  • The Session Template parameter allows you to copy properties from an existing Reviewer session into the new session created by this tool. Properties include the following:

    • Continue batch processing if check fails
    • Continue batch processing if default checks return error
    • Reviewer Table Properties
    • Default checks

    If you use a session template, the following parameters will be disabled:

    • Check For Duplicates
    • Do Not Store Geometry
    • Session User Name
    • Session Version

    To specify these parameter values for the new session, do not choose a session template.

  • The Check For Duplicates parameter specifies how duplicate validation results will be handled in the session. Duplicate errors are those that have matching values in the OBJECTID or IDENTIFIER, REVIEWERCODE, ORIGINTABLE, and PARAMETER fields.

Parameters

LabelExplanationData Type
Reviewer Workspace

The workspace where the new Reviewer session will be created.

Workspace
Session Name

The name of the session that will be created in the Reviewer workspace.

String
Session Template
(Optional)

An existing Reviewer session whose properties will be copied to the new session.

String
Check For Duplicates
(Optional)

Specifies how duplicate validation results will be handled in the session.

  • NoneNo search will be conducted for duplicate validation results. This will improve performance when writing validation results to the database. This is the default.
  • SessionThe session will be searched for duplicate validation results.
  • DatabaseThe entire database will be searched for duplicate validation results.
String
Do Not Store Geometry
(Optional)

Specifies whether results will include an associated geometry.

  • Store geometryResults will include both geometry and attribute information. This is the default.
  • Do not store geometryResults will include only attribute information. This can improve performance when writing validation results to the geodatabase.
Boolean
Session User Name
(Optional)

The username of the person creating the Reviewer session. The default is the Windows user who is actively logged in.

String
Session Version
(Optional)

The enterprise geodatabase version that the session will be associated with. This parameter is only enabled when the Reviewer workspace is stored in an enterprise geodatabase.

String

Derived Output

LabelExplanationData Type
Reviewer Session

The name of the new Reviewer session created.

String

arcpy.Reviewer.CreateReviewerSession(reviewer_workspace, session_name, {session_template}, {duplicate_checking}, {store_geometry}, {username}, {version})
NameExplanationData Type
reviewer_workspace

The workspace where the new Reviewer session will be created.

Workspace
session_name

The name of the session that will be created in the Reviewer workspace.

String
session_template
(Optional)

An existing Reviewer session whose properties will be copied to the new session.

String
duplicate_checking
(Optional)

Specifies how duplicate validation results will be handled in the session.

  • NONENo search will be conducted for duplicate validation results. This will improve performance when writing validation results to the database. This is the default.
  • SESSIONThe session will be searched for duplicate validation results.
  • DATABASEThe entire database will be searched for duplicate validation results.
String
store_geometry
(Optional)

Specifies whether results will include an associated geometry.

  • STORE_GEOMETRYResults will include both geometry and attribute information. This is the default.
  • DO_NOT_STORE_GEOMETRYResults will include only attribute information. This can improve performance when writing validation results to the geodatabase.
Boolean
username
(Optional)

The username of the person creating the Reviewer session. The default is the Windows user who is actively logged in.

String
version
(Optional)

The enterprise geodatabase version that the session will be associated with. This parameter is only enabled when the Reviewer workspace is stored in an enterprise geodatabase.

String

Derived Output

NameExplanationData Type
session

The name of the new Reviewer session created.

String

Code sample

CreateReviewerSession example 1 (stand-alone script)

This stand-alone Python script creates a session in the Reviewer workspace stored in an enterprise geodatabase. The session is called QC Pass 1.

# Name: CreateReviewerSession.py
# Description: Creates a reviewer session in a geodatabase
# Author: Esri
# Date: December 2011

# Import arcpy module
import arcpy

# check out a data reviewer extension license
arcpy.CheckOutExtension("datareviewer")

# path to a workspace
reviewer_gdb = "C:/SampleData/Reviewer.sde"

# Execute the Create Reviewer Session tool
arcpy.CreateReviewerSession_Reviewer(reviewer_gdb, "QC Pass 1")

# check in the data reviewer extension
arcpy.CheckInExtension("datareviewer")
CreateReviewerSession example 2 (stand-alone script)

This stand-alone Python script creates a session in the Reviewer workspace stored in an enterprise geodatabase. The duplicate checking and store geometry parameters are set.

# Name: CreateReviewerSession.py
# Description: Creates a reviewer session in a geodatabase
# Author: Esri
# Date: May 2015

# Import arcpy module
import arcpy

# check out a data reviewer extension license
arcpy.CheckOutExtension("datareviewer")

# path to a workspace
reviewer_gdb = "C:/SampleData/Reviewer.sde"

# Execute the Create Reviewer Session tool. Do not specify a template session and set the duplicate checking and store geometry parameters.
# Session User Name parameter is not supplied so it will be set to the logged in user name.
# Session Version parameter is not supplied so it will be set to the Default version.

arcpy.CreateReviewerSession_Reviewer(reviewer_gdb, 'Test Session', '', 'DATABASE', 'DO_NOT_STORE_GEOMETRY')

# check in the data reviewer extension
arcpy.CheckInExtension("datareviewer")

Environments

Licensing information

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

Related topics