Using GFXD Commands to Export and Import Data

The gfxd utility provides several commands that use the DdlUtils 1.1 API to export and import database schemas and table data. You can use these gfxd commands with GemFire XD and other JDBC datasources.

Note: The GemFire XD stored procedures available in the SYSCS_UTIL schema (IMPORT_DATA_EX and IMPORT_TABLE_EX) provide the highest performance for importing bulk data. Consider using the stored procedures for data sets larger than several gigabytes. See Exporting and Importing Bulk Data from Text Files.

As with the import system procedures, the GFXD commands for importing data can optionally use the skip-constraint-checks and skip-listeners connection properties to relax table constraints and bypass listeners when importing data. This can be especially helpful with HDFS-persistent tables, where constraint checks may need to access data that is persisted in HDFS rather than in operational memory.

Note: As a best practice, use the SYS.CREATE_ALL_BUCKETS procedure to pre-allocate partitioned table buckets before you import data into a partitioned table. This helps to ensure that partitioned table data is evenly distributed throughout the distributed system, even if you import table data using concurrent processes.
These gfxd commands are used to write existing database information to files:
These gfxd commands are used to import database information from files:

When you migrate a third-party database schema to GemFire XD, use write-schema-to-sql and then modify the SQL statements to include GemFire XD-specific features such as table partitioning and replication. Then use an interactive gfxd session to execute the script in GemFire XD. See run.

When you migrate a schema from one GemFire XD system to another, use write-schema-to-xml or use write-schema-to-sql with the -export-all option to include GemFire XD-specific extensions in the DDL commands.

Note: Databases such as Oracle 11g contain system tables with data types that are incompatible with the DdlUtils 1.1 API. To export schemas or data from these databases, you must use the -schema-pattern option with the gfxd command to exclude schemas that contain incompatible data types. See write-schema-to-xml.

The sections that follow describe how to use the above gfxd commands to migrate a third-party database to GemFire XD.