Loading Dumped Files into NuoDB Target Database
The nuodb-migrator load command uses the files created by nuodb-migrator dump 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-migratorMaps 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
SYSDATEwill be converted toNOW. -
Convert
CHECKconstraints 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
INSERTDDL SQL statements to load the data. There is a command line option to override this behavior and useREPLACEDDL SQL statements.
See nuodb-migrator Load Command options for a complete list of command line options and examples of their usage.