Loading Dumped Files into NuoDB Target Database
The NuoDB Migrator load
command uses the files created by the dump
command to generate the objects and load the data into a target NuoDB database.
This load process will dynamically transform the XML file generated from the dump processing into DDL SQL statements and execute these DDL SQL statements in NuoDB.
For performance reasons, by default, these DDL SQL statements are not written to a file.
There is a NuoDB Migrator tool properties file that contains a JDBC connection setting that can be uncommented to log these DDL SQL statements to a file (see NuoDB Migrator Properties File).
The following NuoDB Migrator load
command will generate and load objects into a target NuoDB database using output generated by the NuoDB Migrator tool dump processing:
nuodb-migrator load \
--target.url=jdbc:target_jdbc_url \
--target.schema=my_schema \
--target.username=userid \
--target.password=passwd \
--input.path=path_for_dump_files
The NuoDB Migrator load
command will inspect and transform the XML file generated by the dump processing.
It will execute DDL SQL commands that are supported by the NuoDB SQL syntax.
This processing has certain default behaviors that can be overridden by using NuoDB Migrator load
command line options. The transformation processing will:
-
Map all source database data types to NuoDB data types. See How NuoDB Migrator Maps Data Types. There are command line options that can override the default behavior.
-
Execute DDL SQL statements, supported by the NuoDB SQL syntax, for generating column and table constraints. This can change the default value of some columns, for example, default value
SYSDATE
will be converted toNOW
. -
Convert
CHECK
constraints that support NuoDB data types and NuoDB SQL syntax. -
By default generate drop and create DDL for all objects. There is a command line option to override this behavior.
-
By default generate
INSERT
DDL SQL statements to load the data. There is a command line option to override this behavior and useREPLACE
DDL SQL statements.
See NuoDB Migrator Load Command options for a complete list of command line options and examples of their usage.