CreateSQLiteDatabase (arcpy)

Summary

Creates a new SQLite database.

Syntax

CreateSQLiteDatabase (sqlite_database_path, {spatial_type})
ParameterExplanationData Type
sqlite_database_path

Location of the SQLite database to be created, and the name of the SQLite database in the file name. You must include the .sqlite extension.

String
spatial_type

The geometry type to install with the new SQLite database.

  • ST_GEOMETRYEsri's spatial storage type. This is the default.
  • SPATIALITESpatialLite spatial storage type.
String
Return Value
Data TypeExplanation
File

A SQLite database (.sqlite extension) with either ST_Geometry or SpatiaLite spatial type installed.

Code Sample

CreateSQLiteDatabase example

Create an SQLite database.

import arcpy

# Set local variables
sqlite_database_path = 'C:/Data/Counties.sqlite'

# Execute CreateSQLiteDatabase
arcpy.gp.CreateSQLiteDatabase(sqlite_database_path, "ST_GEOMETRY")
12/16/2013