NuoDB Migrator Load Command
The load
command loads data into a target NuoDB database from data and/or metadata dump files that were generated by the NuoDB Migrator dump
command processing.
The types of options that are available to the load
command are:
-
Target database options
Specify the details for the target NuoDB database, such as database connection, login credentials, etc. -
Input file specifications
Specify the location and any specific formatting of the source database data dump file from the migratordump
processing. -
Migration mode
Specifies the migratorload
command mode:
Option | Description |
---|---|
--data=true --schema=true |
|
--data=false --schema=true |
|
--data=true --schema=false |
|
-
Commit Strategy and Insert type specifications
Specify how often commits are done during the load processing. -
Insert type specifications
Specify the type of data load DDL sql statements to generate. Theload
command can generateINSERT
orREPLACE
SQL statements. -
Schema options
These options are used if the migration mode includes theschema
command. The specific commands available are listed on theschema
command listing (see NuoDB Migrator Schema Command).
The output from running the load
command includes a data types mapping summary.
For each source type, the summary shows the NuoDB type to which it was mapped.
Syntax
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 [ option ]...
The following is a list of load
command line options.
Options related to the target database connection. | ||
---|---|---|
Option |
Required |
Description |
--target.url= |
No |
Target database connection URL in the format, |
--target.username= |
No |
Target database user name |
--target.password= |
No |
Target database password |
--target.properties= |
No |
Additional connection properties encoded as URL query string, e.g. “ |
--target.schema= |
No |
Database schema name to use. If not provided, objects will be generated in the same schema as the source database schema. |
Options related to input specification | ||
---|---|---|
Option |
Required |
Description |
--input.path= |
Yes |
Path on the file system where the catalog dump file, |
--input.{csv | xml}. |
No |
Input format attributes. These are specific to the type of input being read.
For
For xml, the valid attributes (
|
Migration modes | ||
---|---|---|
Option |
Required |
Description |
--data={ true | false } |
No |
Enables or disables data being loaded. Default is |
--schema={ true | false } |
No |
Enables or disables the execution of a DDL sql script file to generate schema objects prior to loading the data. Default is |
Commit Strategy | ||
---|---|---|
Option |
Required |
Description |
--commit.strategy={ single | batch | |
No |
Commit strategy name, either |
--commit.
|
No |
Set commit strategy attributes, such as |
Options related to insert type specification | ||
---|---|---|
Option |
Required |
Description |
--replace (-r) |
No |
Writes |
--table. |
No |
Writes |
--table. |
No |
Writes |
--time.zone= |
No |
Time zone enables data columns to be dumped and reloaded between servers in different time zones |
Schema migration commands (supported if command line parameter option --schema=true is used) |
||
---|---|---|
Option |
Required |
Description |
Various |
No |
Various optional |
Executor Options | ||
---|---|---|
Option |
Required |
Description |
--threads (-t)= |
No |
Number of worker threads. Defaults to the number of available processors. Default command line options values for parallel loader:
|
--parallelizer (-p)= { table.level | row.level | |
No |
Parallelization strategy name, either |
--parallelizer. |
No |
Parallelizer attributes, such as Parallelizer attributes
|
Usage Example
The following load
command restores a database dump to the NuoDB db1
database using a dump catalog file and set of data files that are located in the /tmp
directory.
$ nuodb-migrator load \
--target.url=jdbc:com.nuodb://localhost/db1 \
--target.username=dba \
--target.password=goalie \
--input.path=/tmp