Overview of DdlUtils

DdlUtils is a small, easy-to-use component for working with Database Definition (DDL) files.

DdlUtils is an Apache project. Use it to:
  • Generate DDL scripts from an existing database by using Ant tasks or a Java API.
  • Export and import data to/from XML from an supported database to another supported database (including GemFire XD).
  • Take XML files that contain the definition of a database schema, for example, tables and columns. These files can be fed into DdlUtils through its Ant task or programmatically in order to create the corresponding database or alter it so that it corresponds to the DDL. Likewise, DdlUtils can generate a DDL file for an existing database.
Note: The instructions in this section use a version of DdlUtils that has been modified to support GemFire XD and its SQL dialect. This version of DdlUtils is installed with GemFire XD, and is available in the /lib/ddlutils sub directory of the GemFire XD installation directory. Ensure that you use the installed version of DdlUtils, rather than the standard Apache version, when performing the instructions.

A common usage pattern with GemFire XD is as a database cache in front of a relational data store. DdlUtils provides a way to export the schema definition from a relational database as a SQL script so the developer can tailor it for partitioning and replication and then import the schema into GemFire XD.

DdlUtils can optionally be used to export from an external database and import the same into GemFire XD.

Note: If you attempt to export and import data that includes auto-generated primary key columns, the data row import fails. GemFire XD adds distributed system data into generated keys, and this precludes referencing those generated keys by subsequent imported data rows.