dbgdb

Getting Started

Prerequisites

Installing the Library

You can use pip to install dbgdb.

pip install dbgdb

GDAL/OGR

You will need to have ogr2ogr installed. You can arrange this by installing GDAL.

Note

In this early version we expect ogr2ogr to be in your system path. Improvements on that point are forthcoming.

Using Tasks

This library contains a number of Luigi tasks that you can use in your own pipelines. These include:

Using the Command Line

Most of the commands you run with the command-line interface (CLI) create Luigi tasks which are then submitted to a Luigi scheduler.

Note

The -l parameter indicates that the tasks should be run using the local scheduler. The examples listed below use this parameter. If you want to submit tasks to the Luigi daemon (luigid) you can simply omit this parameter.

Getting Help

dbgdb has its own command-line help.

dbgdb --help

Loading Data

You can load a file geodatabase with the load subcommand.

dbgdb -l load --schema myschema /path/to/your/data.gdb

Extracting Data

You can extract all of the data within a schema to an output file with the extract subcommand.

dbgdb -l extract  --schema myschema /path/to/your/exported/data.db

Note

At the moment, we can export to GeoPackage or Spatialite formats. Support for ESRI File Geodatabases (gdb) is still in the works.

Dropping a Schema

If the target schema for your load command already exists, you may notice Luigi reporting there was nothing to do because, from the task’s perspective, the work has already been done. If you need to drop a schema, you can use the drop subcommand.

dbgdb -l drop schema myschema

Resources

Would you like to learn more? Check out the links below.