Convert Schema Report (Data Management)

Summary

Converts a JSON or XLSX formatted schema report to another schema report format or to an XML workspace document that can be used to create a geodatabase.

Usage

  • This tool will only run successfully on .json or .xlsx files created by the Generate Schema Report tool.

  • Schema report input must represent a geodatabase workspace. Reports created from feature classes or feature datasets are not valid inputs for this tool.

  • Changes made to the .json or .xlsx files are not validated during the conversion.

Parameters

LabelExplanationData Type
Schema Report

The JSON or XLSX schema report that will be converted.

File
Output Location

The folder where the output files will be placed

Folder
Name

The name of the file outputs.

String
Output Formats

Specifies the file types that will be included in the output folder.

  • JSONThe output folder will include a .json file.
  • PDFThe output folder will include a .pdf file.
  • HTMLThe output folder will include an .html file.
  • XLSXThe output folder will include an Excel .xlsx file.
  • XMLThe output folder will include an .xml file.
String

Derived Output

LabelExplanationData Type
Output Files

The derived file types in the output folder.

File

arcpy.management.ConvertSchemaReport(schema_report, out_location, name, formats)
NameExplanationData Type
schema_report

The JSON or XLSX schema report that will be converted.

File
out_location

The folder where the output files will be placed

Folder
name

The name of the file outputs.

String
formats
[formats,...]

Specifies the file types that will be included in the output folder.

  • JSONThe output folder will include a .json file.
  • PDFThe output folder will include a .pdf file.
  • HTMLThe output folder will include an .html file.
  • XLSXThe output folder will include an Excel .xlsx file.
  • XMLThe output folder will include an .xml file.
String

Derived Output

NameExplanationData Type
out_files

The derived file types in the output folder.

File

Code sample

ConvertSchemaReport example 1 (Python window)

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

import arcpy
arcpy.management.ConvertSchemaReport("C:\folder\TEST.xlsx", "C:\location\folder",
                                     "NEW", ["JSON", "XLSX", "HTML", "PDF", "XML"])
ConvertSchemaReport example 2 (stand-alone script)

The following stand-alone script is an example of how to use the ConvertSchemaReport function in a scripting environment.

# Name: ConvertSchemaReport_Example.py
# Description: ConvertSchemaReport of a file geodatabase

# Import the system modules
import arcpy

# Set local variables
out_location=r"C:\location\folder"

arcpy.management.ConvertSchemaReport(schema_report=r"C:\folder\TEST.xlsx", out_location,
                                     name="NEW", formats=["JSON", "XLSX", "HTML", "PDF", "XML"])

Environments

This tool does not use any geoprocessing environments.

Licensing information

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

Related topics