Skip To Content

Merge Mosaic Dataset Items


Groups multiple items in a mosaic dataset together as one item.


  • Selections and queries should be used to choose the mosaic dataset items to merge. If a block field is also specified, the tool will take the results of the selection and merge all the similar block fields into separate rows.

  • The default number of maximum allowed items per merge is 1,000. If the maximum is exceeded, the tool will insert additional merged items for the selection or query. For example, if 2,000 items are selected, the tool will create two merged items.


MergeMosaicDatasetItems_management (in_mosaic_dataset, {where_clause}, {block_field}, {max_rows_per_merged_items})
ParameterExplanationData Type

The mosaic dataset that has the items that you want to merge.

Image Service; Mosaic Layer; String

An SQL expression to select specific rasters to merge in the mosaic dataset.

SQL Expression

The field in the attribute table that you want to use to group images. Only date, numeric, and string fields can be specified as Block fields.


Limits the number of items to merge. If the maximum is exceeded, the tool will create multiple merged items. The default is 1,000 rows.


Code sample

MergeMosaicDatasetItems example 1 (Python window)

This is a Python sample for the MergeMosaicDatasetItems tool.

import arcpy
                                         "", "Year", "2000")
MergeMosaicDatasetItems example 2 (stand-alone script)

This is a Python script sample for the MergeMosaicDatasetItems tool.

#Merge items with items that are newer than year 1999

import arcpy
    "c:/data/merge_md_items.gdb/md", "Year>1999", "", "1000")


This tool does not use any geoprocessing environments.

Licensing information

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