Export Mosaic Dataset Paths (Data Management)

Summary

Creates a table of the file path for each item in a mosaic dataset. You can specify whether the table contains all the file paths or just the ones that are broken.

Usage

  • The output of this tool is a table, either in a geodatabase or a .dbf file.

Parameters

LabelExplanationData Type
Mosaic Dataset

The mosaic dataset containing the file paths to export.

Mosaic Layer
Output Table

The table to create. The table can be a geodatabase table or a .dbf file.

The SourceOID field in the output table is derived from the OID of the row in the original mosaic dataset table.

Table
Query Definition
(Optional)

An SQL expression to select specific rasters for export.

SQL Expression
Export Mode
(Optional)

Populate the table with either all of the paths, or only the broken paths.

  • ALLExport all paths to the table. This is the default.
  • BROKENExport only broken paths to the table.
String
Types of paths to export
(Optional)

Choose to export file paths from only the source raster, only the cache, or both. The default is to export all path types.

  • RASTERExport file paths from rasters.
  • ITEM_CACHEExport file paths from item cache.
String

arcpy.management.ExportMosaicDatasetPaths(in_mosaic_dataset, out_table, {where_clause}, {export_mode}, {types_of_paths})
NameExplanationData Type
in_mosaic_dataset

The mosaic dataset containing the file paths to export.

Mosaic Layer
out_table

The table to create. The table can be a geodatabase table or a .dbf file.

The SourceOID field in the output table is derived from the OID of the row in the original mosaic dataset table.

Table
where_clause
(Optional)

An SQL expression to select specific rasters for export.

SQL Expression
export_mode
(Optional)

Populate the table with either all of the paths, or only the broken paths.

  • ALLExport all paths to the table. This is the default.
  • BROKENExport only broken paths to the table.
String
types_of_paths
[type_of_path,...]
(Optional)

Choose to export file paths from only the source raster, only the cache, or both. The default is to export all path types.

  • RASTERExport file paths from rasters.
  • ITEM_CACHEExport file paths from item cache.
String

Code sample

ExportMosaicDatasetPaths example 1 (Python window)

This is a Python sample for the ExportMosaicDatasetPaths tool.

import arcpy
arcpy.ExportMosaicDatasetPaths_management(
     "C:/Workspace/exportmd.gdb/md", "C:/workspace/brokenpaths.dbf",
     "#", "BROKEN", "RASTER")
ExportMosaicDatasetPaths example 2 (stand-alone script)

This is a Python script sample for the ExportMosaicDatasetPaths tool.

#Export broken raster path in FGDB Mosaic Dataset to dbf table

import arcpy
arcpy.env.workspace = "C:/Workspace"

mdname = "exportmd.gdb/md"
outtable = "C:/workspace/brokenpaths.dbf"
query = "#"
mode = "BROKEN"
pathtype = "RASTER"

arcpy.ExportMosaicDatasetPaths_management(mdname, outtable, query, 
                                          mode, pathtype)