ArcGIS Desktop

  • Documentation
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Split By Attributes

  • Summary
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

Summary

Splits an input dataset by unique attributes.

Usage

  • The Input Table can be a feature class or table.

  • A feature class or table will be created for every unique combination of attributes from the Split Fields parameter.

Syntax

SplitByAttributes_analysis (Input_Table, Target_Workspace, Split_Fields)
ParameterExplanationData Type
Input_Table

The input feature class or table whose data will be split into the target workspace.

Table View
Target_Workspace

The existing workspace where the output feature classes or tables are written.

Workspace
Split_Fields
[Split_Fields,...]

The fields on which the input will be split into new feature classes or tables.

Field

Code sample

SplitByAttributes example 1 (Python window)

The following Python window script demonstrates how to use the SplitByAttributes tool in immediate mode.

import arcpy
arcpy.env.workspace = 'c:/data/base.gdb'
arcpy.SplitByAttributes_analysis('ecology', arcpy.env.scratchGDB, ['REGION', 'ECO_CODE'])
SplitByAttributes example 2 (stand-alone Python script)

The following script demonstrates how to use the SplitByAttributes tool.

# Name: SplitByAttributes.py
# Description: Use the SplitByAttributes tool to split a feature class by unique values.

# Import required modules
import arcpy

# Set local variables
in_feature_class = 'c:/data/base.gdb/ecology'
target_workspace = 'c:/data/output.gdb'
fields = ['REGION', 'ECO_CODE']

arcpy.SplitByAttributes_analysis(in_feature_class, target_workspace, fields)

Environments

  • Current Workspace
  • Scratch Workspace
  • Default Output Z Value
  • M Resolution
  • M Tolerance
  • Output CONFIG Keyword
  • Output M Domain
  • Output XY Domain
  • Output Coordinate System
  • Extent
  • Output has M values
  • Output has Z values
  • XY Resolution
  • XY Tolerance

Licensing information

  • ArcGIS Desktop Basic: Yes
  • ArcGIS Desktop Standard: Yes
  • ArcGIS Desktop Advanced: Yes

Related topics

  • An overview of the Extract toolset

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2017 Esri. | Privacy | Legal