Create Catalog Dataset (Data Management)

Summary

Creates a catalog dataset to which collections of layers, rasters, datasets, and other items can be added.

Usage

  • The catalog dataset must be created in a geodatabase.

  • After creating a catalog dataset, use the Add Items To Catalog Dataset tool to populate it with locally based items. To populate the catalog dataset with items stored in an enterprise portal, use the Add Portal Items To Catalog Dataset tool.

  • The fields, domains, subtypes, and attribute rules of the template datasets will be transferred to the catalog dataset. Fields with the same names as required fields of the catalog dataset will be ignored.

  • The first feature class or table listed in the Template Datasets parameter is considered the primary dataset for certain scenarios. If multiple template datasets contain fields with the same name, only one field of that name will be created. The hasZ property of the first feature class in the list will also be considered.

  • The name of the catalog dataset must be in accordance with the limits of the geodatabase or underlying database; for example, the name cannot start with a number.

Parameters

LabelExplanationData Type
Catalog Dataset Location

The enterprise or file geodatabase in which the output catalog dataset will be created.

Workspace; Feature Dataset
Catalog Dataset Name

The name of the catalog dataset that will be created.

String
Template Datasets
(Optional)

The feature class or table that will be used as a template to define the attribute fields of the new catalog dataset.

Table View
Has Z
(Optional)

Specifies whether the catalog dataset will contain elevation values (z-values).

  • DisabledThe output catalog dataset will not contain z-values. This is the default.
  • EnabledThe output catalog dataset will contain z-values.
  • Same as TemplateThe output catalog dataset will contain z-values if the dataset specified in the Template Datasets parameter contains z-values.
String
Coordinate System
(Optional)

The spatial reference of the catalog dataset.

Spatial Reference
Catalog Dataset Alias
(Optional)

The alias name of the catalog dataset.

String
Configuration Keyword
(Optional)

The configuration keyword determines the storage parameters of the database table. The configuration keyword applies to enterprise data only.

String

Derived Output

LabelExplanationData Type
Output Catalog Dataset

The new catalog dataset.

Feature Class

arcpy.management.CreateCatalogDataset(out_path, out_name, {template}, {has_z}, {spatial_reference}, {out_alias}, {config_keyword})
NameExplanationData Type
out_path

The enterprise or file geodatabase in which the output catalog dataset will be created.

Workspace; Feature Dataset
out_name

The name of the catalog dataset that will be created.

String
template
[template,...]
(Optional)

The feature class or table that will be used as a template to define the attribute fields of the new catalog dataset.

Table View
has_z
(Optional)

Specifies whether the catalog dataset will contain elevation values (z-values).

  • DISABLEDThe output catalog dataset will not contain z-values. This is the default.
  • ENABLEDThe output catalog dataset will contain z-values.
  • SAME_AS_TEMPLATEThe output catalog dataset will contain z-values if the dataset specified in the template parameter contains z-values.
String
spatial_reference
(Optional)

The spatial reference of the catalog dataset.

Spatial Reference
out_alias
(Optional)

The alias name of the catalog dataset.

String
config_keyword
(Optional)

The configuration keyword determines the storage parameters of the database table. The configuration keyword applies to enterprise data only.

String

Derived Output

NameExplanationData Type
out_catalog_dataset

The new catalog dataset.

Feature Class

Code sample

CreateCatalogDataset example 1 (Python window)

The following Python window script demonstrates how to use the CreateCatalogDataset function.

import arcpy
arcpy.env.workspace = "C:/Dataspace"
dataset = "C:/Dataspace/studyarea.gdb/StudyAreaDataset"
spatial_ref = arcpy.Describe(dataset).spatialReference
arcpy.management.CreateCatalogDataset("C:/Dataspace/studyarea.gdb", 
                                      "SampleCatalog", "SampleFeatureClass", 
                                      "DISABLED", spatial_ref, 
                                      "NewCatalogDataset", "DEFAULTS")
CreateCatalogDataset example 2 (stand-alone script)

Instantiate and create a catalog dataset.

#Import system modules
import arcpy

# Set environment settings
arcpy.env.workspace = "C:/data/output.gdb"

# Set local variables
catalogName = "MyCatalogDataset"
outCatalogDataset = "C:/output/output.gdb/catalogds1"
zValuesPresent = "ENABLED"

# Run CreateCatalogDataset
arcpy.management.CreateCatalogDataset(outCatalogDataset, catalogName, " ",
                                      zValuesPresent)

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes

Related topics