ogr2ogr and IMPORT.
In the example below we will import a data set with the locations of natural springs in the state of Minnesota (USA) that is made available via gisdata.mn.gov.
Before You Begin
To follow along with the example below, you will need the following prerequisites:An
ogr2ogr version of 3.1.0 or higher is required to generate data that can be imported into CockroachDB.Step 1. Download the GeoPackage data
-
Download the zip file containing the spring location data:
-
Unzip the file:
Step 2. Convert the GeoPackage data to SQL
To load the GeoPackage into CockroachDB, we must first convert it to SQL using theogr2ogr tool.
ogr2ogr version of 3.1.0 or higher is required to generate data that can be imported into CockroachDB.
Step 3. Host the files where the cluster can access them
Each node in the CockroachDB cluster needs to have access to the files being imported. There are several ways for the cluster to access the data; for a complete list of the types of storageIMPORT can pull from, see .
For local testing, you can . The following command will start a local file server listening on port 3000:

