'\" t .\" Title: ndb_import .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: 03/11/2024 .\" Manual: MySQL Database System .\" Source: MySQL 8.4 .\" Language: English .\" .TH "NDB_IMPORT" "1" "03/11/2024" "MySQL 8\&.4" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" ndb_import \- Import CSV data into NDB .SH "SYNOPSIS" .HP \w'\fBndb_import\ \fR\fB\fIoptions\fR\fR\ 'u \fBndb_import \fR\fB\fIoptions\fR\fR .SH "DESCRIPTION" .PP \fBndb_import\fR imports CSV\-formatted data, such as that produced by \fBmysqldump\fR \fB\-\-tab\fR, directly into NDB using the NDB API\&. \fBndb_import\fR requires a connection to an NDB management server (\fBndb_mgmd\fR) to function; it does not require a connection to a MySQL Server\&. Usage .sp .if n \{\ .RS 4 .\} .nf ndb_import \fIdb_name\fR \fIfile_name\fR \fIoptions\fR .fi .if n \{\ .RE .\} .PP \fBndb_import\fR requires two arguments\&. \fIdb_name\fR is the name of the database where the table into which to import the data is found; \fIfile_name\fR is the name of the CSV file from which to read the data; this must include the path to this file if it is not in the current directory\&. The name of the file must match that of the table; the file\*(Aqs extension, if any, is not taken into consideration\&. Options supported by \fBndb_import\fR include those for specifying field separators, escapes, and line terminators, and are described later in this section\&. .PP \fBndb_import\fR rejects any empty lines which it reads from the CSV file, except when importing a single column, in which case an empty value can be used as the column value\&. \fBndb_import\fR handles this in the same manner as a LOAD DATA statement does\&. .PP \fBndb_import\fR must be able to connect to an NDB Cluster management server; for this reason, there must be an unused [api] slot in the cluster config\&.ini file\&. .PP To duplicate an existing table that uses a different storage engine, such as InnoDB, as an NDB table, use the \fBmysql\fR client to perform a SELECT INTO OUTFILE statement to export the existing table to a CSV file, then to execute a CREATE TABLE LIKE statement to create a new table having the same structure as the existing table, then perform ALTER TABLE \&.\&.\&. ENGINE=NDB on the new table; after this, from the system shell, invoke \fBndb_import\fR to load the data into the new NDB table\&. For example, an existing InnoDB table named myinnodb_table in a database named myinnodb can be exported into an NDB table named myndb_table in a database named myndb as shown here, assuming that you are already logged in as a MySQL user with the appropriate privileges: .sp .RS 4 .ie n \{\ \h'-04' 1.\h'+01'\c .\} .el \{\ .sp -1 .IP " 1." 4.2 .\} In the \fBmysql\fR client: .sp .if n \{\ .RS 4 .\} .nf mysql> \fBUSE myinnodb;\fR mysql> \fBSELECT * INTO OUTFILE \*(Aq/tmp/myndb_table\&.csv\*(Aq\fR > \fBFIELDS TERMINATED BY \*(Aq,\*(Aq OPTIONALLY ENCLOSED BY \*(Aq"\*(Aq ESCAPED BY \*(Aq\e\e\*(Aq\fR > \fBLINES TERMINATED BY \*(Aq\en\*(Aq\fR > \fBFROM myinnodbtable;\fR mysql> \fBCREATE DATABASE myndb;\fR mysql> \fBUSE myndb;\fR mysql> \fBCREATE TABLE myndb_table LIKE myinnodb\&.myinnodb_table;\fR mysql> \fBALTER TABLE myndb_table ENGINE=NDB;\fR mysql> \fBEXIT;\fR Bye $> .fi .if n \{\ .RE .\} .sp Once the target database and table have been created, a running \fBmysqld\fR is no longer required\&. You can stop it using \fBmysqladmin shutdown\fR or another method before proceeding, if you wish\&. .RE .sp .RS 4 .ie n \{\ \h'-04' 2.\h'+01'\c .\} .el \{\ .sp -1 .IP " 2." 4.2 .\} In the system shell: .sp .if n \{\ .RS 4 .\} .nf # if you are not already in the MySQL bin directory: $> \fBcd \fR\fB\fIpath\-to\-mysql\-bin\-dir\fR\fR $> \fBndb_import myndb /tmp/myndb_table\&.csv \-\-fields\-optionally\-enclosed\-by=\*(Aq"\*(Aq \e\fR \fB\-\-fields\-terminated\-by="," \-\-fields\-escaped\-by=\*(Aq\e\e\*(Aq\fR .fi .if n \{\ .RE .\} .sp The output should resemble what is shown here: .sp .if n \{\ .RS 4 .\} .nf job\-1 import myndb\&.myndb_table from /tmp/myndb_table\&.csv job\-1 [running] import myndb\&.myndb_table from /tmp/myndb_table\&.csv job\-1 [success] import myndb\&.myndb_table from /tmp/myndb_table\&.csv job\-1 imported 19984 rows in 0h0m9s at 2277 rows/s jobs summary: defined: 1 run: 1 with success: 1 with failure: 0 $> .fi .if n \{\ .RE .\} .RE .PP All options that can be used with \fBndb_import\fR are shown in the following table\&. Additional descriptions follow the table\&. .PP .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-abort\-on\-error\fR .TS allbox tab(:); lB l. T{ Command-Line Format T}:T{ --abort-on-error T} .TE .sp 1 Dump core on any fatal error; used for debugging only\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-ai\-increment\fR=\fI#\fR .TS allbox tab(:); lB l lB l lB l lB l lB l. T{ Command-Line Format T}:T{ --ai-increment=# T} T{ Type T}:T{ Integer T} T{ Default Value T}:T{ 1 T} T{ Minimum Value T}:T{ 1 T} T{ Maximum Value T}:T{ 4294967295 T} .TE .sp 1 For a table with a hidden primary key, specify the autoincrement increment, like the auto_increment_increment system variable does in the MySQL Server\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-ai\-offset\fR=\fI#\fR .TS allbox tab(:); lB l lB l lB l lB l lB l. T{ Command-Line Format T}:T{ --ai-offset=# T} T{ Type T}:T{ Integer T} T{ Default Value T}:T{ 1 T} T{ Minimum Value T}:T{ 1 T} T{ Maximum Value T}:T{ 4294967295 T} .TE .sp 1 For a table with hidden primary key, specify the autoincrement offset\&. Similar to the auto_increment_offset system variable\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-ai\-prefetch\-sz\fR=\fI#\fR .TS allbox tab(:); lB l lB l lB l lB l lB l. T{ Command-Line Format T}:T{ --ai-prefetch-sz=# T} T{ Type T}:T{ Integer T} T{ Default Value T}:T{ 1024 T} T{ Minimum Value T}:T{ 1 T} T{ Maximum Value T}:T{ 4294967295 T} .TE .sp 1 For a table with a hidden primary key, specify the number of autoincrement values that are prefetched\&. Behaves like the ndb_autoincrement_prefetch_sz system variable does in the MySQL Server\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-character\-sets\-dir\fR .TS allbox tab(:); lB l. T{ Command-Line Format T}:T{ --character-sets-dir=path T} .TE .sp 1 Directory containing character sets\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-connections\fR=\fI#\fR .TS allbox tab(:); lB l lB l lB l lB l lB l. T{ Command-Line Format T}:T{ --connections=# T} T{ Type T}:T{ Integer T} T{ Default Value T}:T{ 1 T} T{ Minimum Value T}:T{ 1 T} T{ Maximum Value T}:T{ 4294967295 T} .TE .sp 1 Number of cluster connections to create\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-connect\-retries\fR .TS allbox tab(:); lB l lB l lB l lB l lB l. T{ Command-Line Format T}:T{ --connect-retries=# T} T{ Type T}:T{ Integer T} T{ Default Value T}:T{ 12 T} T{ Minimum Value T}:T{ 0 T} T{ Maximum Value T}:T{ 12 T} .TE .sp 1 Number of times to retry connection before giving up\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-connect\-retry\-delay\fR .TS allbox tab(:); lB l lB l lB l lB l lB l. T{ Command-Line Format T}:T{ --connect-retry-delay=# T} T{ Type T}:T{ Integer T} T{ Default Value T}:T{ 5 T} T{ Minimum Value T}:T{ 0 T} T{ Maximum Value T}:T{ 5 T} .TE .sp 1 Number of seconds to wait between attempts to contact management server\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-connect\-string\fR .TS allbox tab(:); lB l lB l lB l. T{ Command-Line Format T}:T{ --connect-string=connection_string T} T{ Type T}:T{ String T} T{ Default Value T}:T{ [none] T} .TE .sp 1 Same as \fB\-\-ndb\-connectstring\fR\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-continue\fR .TS allbox tab(:); lB l. T{ Command-Line Format T}:T{ --continue T} .TE .sp 1 When a job fails, continue to the next job\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-core\-file\fR .TS allbox tab(:); lB l. T{ Command-Line Format T}:T{ --core-file T} .TE .sp 1 Write core file on error; used in debugging\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-csvopt\fR=\fIstring\fR .TS allbox tab(:); lB l lB l lB l. T{ Command-Line Format T}:T{ --csvopt=opts T} T{ Type T}:T{ String T} T{ Default Value T}:T{ [none] T} .TE .sp 1 Provides a shortcut method for setting typical CSV import options\&. The argument to this option is a string consisting of one or more of the following parameters: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} c: Fields terminated by comma .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} d: Use defaults, except where overridden by another parameter .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} n: Lines terminated by \en .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} q: Fields optionally enclosed by double quote characters (") .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} r: Line terminated by \er .RE .sp The order of parameters used in the argument to this option is handled such that the rightmost parameter always takes precedence over any potentially conflicting parameters which have already been used in the same argument value\&. This also applies to any duplicate instances of a given parameter\&. .sp This option is intended for use in testing under conditions in which it is difficult to transmit escapes or quotation marks\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-db\-workers\fR=\fI#\fR .TS allbox tab(:); lB l lB l lB l lB l lB l. T{ Command-Line Format T}:T{ --db-workers=# T} T{ Type T}:T{ Integer T} T{ Default Value T}:T{ 4 T} T{ Minimum Value T}:T{ 1 T} T{ Maximum Value T}:T{ 4294967295 T} .TE .sp 1 Number of threads, per data node, executing database operations\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-defaults\-file\fR .TS allbox tab(:); lB l lB l lB l. T{ Command-Line Format T}:T{ --defaults-file=path T} T{ Type T}:T{ String T} T{ Default Value T}:T{ [none] T} .TE .sp 1 Read default options from given file only\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-defaults\-extra\-file\fR .TS allbox tab(:); lB l lB l lB l. T{ Command-Line Format T}:T{ --defaults-extra-file=path T} T{ Type T}:T{ String T} T{ Default Value T}:T{ [none] T} .TE .sp 1 Read given file after global files are read\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-defaults\-group\-suffix\fR .TS allbox tab(:); lB l lB l lB l. T{ Command-Line Format T}:T{ --defaults-group-suffix=string T} T{ Type T}:T{ String T} T{ Default Value T}:T{ [none] T} .TE .sp 1 Also read groups with concat(group, suffix)\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-errins\-type\fR=\fIname\fR .TS allbox tab(:); lB l lB l lB l lB l. T{ Command-Line Format T}:T{ --errins-type=name T} T{ Type T}:T{ Enumeration T} T{ Default Value T}:T{ [none] T} T{ Valid Values T}:T{ .PP stopjob .PP stopall .PP sighup .PP sigint .PP list T} .TE .sp 1 Error insert type; use list as the \fIname\fR value to obtain all possible values\&. This option is used for testing purposes only\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-errins\-delay\fR=\fI#\fR .TS allbox tab(:); lB l lB l lB l lB l lB l lB l. T{ Command-Line Format T}:T{ --errins-delay=# T} T{ Type T}:T{ Integer T} T{ Default Value T}:T{ 1000 T} T{ Minimum Value T}:T{ 0 T} T{ Maximum Value T}:T{ 4294967295 T} T{ Unit T}:T{ ms T} .TE .sp 1 Error insert delay in milliseconds; random variation is added\&. This option is used for testing purposes only\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-fields\-enclosed\-by\fR=\fIchar\fR .TS allbox tab(:); lB l lB l lB l. T{ Command-Line Format T}:T{ --fields-enclosed-by=char T} T{ Type T}:T{ String T} T{ Default Value T}:T{ [none] T} .TE .sp 1 This works in the same way as the FIELDS ENCLOSED BY option does for the LOAD DATA statement, specifying a character to be interpreted as quoting field values\&. For CSV input, this is the same as \fB\-\-fields\-optionally\-enclosed\-by\fR\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-fields\-escaped\-by\fR=\fIname\fR .TS allbox tab(:); lB l lB l lB l. T{ Command-Line Format T}:T{ --fields-escaped-by=char T} T{ Type T}:T{ String T} T{ Default Value T}:T{ \ T} .TE .sp 1 Specify an escape character in the same way as the FIELDS ESCAPED BY option does for the SQL LOAD DATA statement\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-fields\-optionally\-enclosed\-by\fR=\fIchar\fR .TS allbox tab(:); lB l lB l lB l. T{ Command-Line Format T}:T{ --fields-optionally-enclosed-by=char T} T{ Type T}:T{ String T} T{ Default Value T}:T{ [none] T} .TE .sp 1 This works in the same way as the FIELDS OPTIONALLY ENCLOSED BY option does for the LOAD DATA statement, specifying a character to be interpreted as optionally quoting field values\&. For CSV input, this is the same as \fB\-\-fields\-enclosed\-by\fR\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-fields\-terminated\-by\fR=\fIchar\fR .TS allbox tab(:); lB l lB l lB l. T{ Command-Line Format T}:T{ --fields-terminated-by=char T} T{ Type T}:T{ String T} T{ Default Value T}:T{ \t T} .TE .sp 1 This works in the same way as the FIELDS TERMINATED BY option does for the LOAD DATA statement, specifying a character to be interpreted as the field separator\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-help\fR .TS allbox tab(:); lB l. T{ Command-Line Format T}:T{ --help T} .TE .sp 1 Display help text and exit\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-idlesleep\fR=\fI#\fR .TS allbox tab(:); lB l lB l lB l lB l lB l lB l. T{ Command-Line Format T}:T{ --idlesleep=# T} T{ Type T}:T{ Integer T} T{ Default Value T}:T{ 1 T} T{ Minimum Value T}:T{ 1 T} T{ Maximum Value T}:T{ 4294967295 T} T{ Unit T}:T{ ms T} .TE .sp 1 Number of milliseconds to sleep waiting for more work to perform\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-idlespin\fR=\fI#\fR .TS allbox tab(:); lB l lB l lB l lB l lB l. T{ Command-Line Format T}:T{ --idlespin=# T} T{ Type T}:T{ Integer T} T{ Default Value T}:T{ 0 T} T{ Minimum Value T}:T{ 0 T} T{ Maximum Value T}:T{ 4294967295 T} .TE .sp 1 Number of times to retry before sleeping\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-ignore\-lines\fR=\fI#\fR .TS allbox tab(:); lB l lB l lB l lB l lB l. T{ Command-Line Format T}:T{ --ignore-lines=# T} T{ Type T}:T{ Integer T} T{ Default Value T}:T{ 0 T} T{ Minimum Value T}:T{ 0 T} T{ Maximum Value T}:T{ 4294967295 T} .TE .sp 1 Cause ndb_import to ignore the first \fI#\fR lines of the input file\&. This can be employed to skip a file header that does not contain any data\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-input\-type\fR=\fIname\fR .TS allbox tab(:); lB l lB l lB l lB l. T{ Command-Line Format T}:T{ --input-type=name T} T{ Type T}:T{ Enumeration T} T{ Default Value T}:T{ csv T} T{ Valid Values T}:T{ .PP random .PP csv T} .TE .sp 1 Set the type of input type\&. The default is csv; random is intended for testing purposes only\&. \&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-input\-workers\fR=\fI#\fR .TS allbox tab(:); lB l lB l lB l lB l lB l. T{ Command-Line Format T}:T{ --input-workers=# T} T{ Type T}:T{ Integer T} T{ Default Value T}:T{ 4 T} T{ Minimum Value T}:T{ 1 T} T{ Maximum Value T}:T{ 4294967295 T} .TE .sp 1 Set the number of threads processing input\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-keep\-state\fR .TS allbox tab(:); lB l. T{ Command-Line Format T}:T{ --keep-state T} .TE .sp 1 By default, ndb_import removes all state files (except non\-empty *\&.rej files) when it completes a job\&. Specify this option (nor argument is required) to force the program to retain all state files instead\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-lines\-terminated\-by\fR=\fIname\fR .TS allbox tab(:); lB l lB l lB l. T{ Command-Line Format T}:T{ --lines-terminated-by=char T} T{ Type T}:T{ String T} T{ Default Value T}:T{ \n T} .TE .sp 1 This works in the same way as the LINES TERMINATED BY option does for the LOAD DATA statement, specifying a character to be interpreted as end\-of\-line\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-log\-level\fR=\fI#\fR .TS allbox tab(:); lB l lB l lB l lB l lB l. T{ Command-Line Format T}:T{ --log-level=# T} T{ Type T}:T{ Integer T} T{ Default Value T}:T{ 0 T} T{ Minimum Value T}:T{ 0 T} T{ Maximum Value T}:T{ 2 T} .TE .sp 1 Performs internal logging at the given level\&. This option is intended primarily for internal and development use\&. .sp In debug builds of NDB only, the logging level can be set using this option to a maximum of 4\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-login\-path\fR .TS allbox tab(:); lB l lB l lB l. T{ Command-Line Format T}:T{ --login-path=path T} T{ Type T}:T{ String T} T{ Default Value T}:T{ [none] T} .TE .sp 1 Read given path from login file\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-no\-login\-paths\fR .TS allbox tab(:); lB l. T{ Command-Line Format T}:T{ --no-login-paths T} .TE .sp 1 Skips reading options from the login path file\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-max\-rows\fR=\fI#\fR .TS allbox tab(:); lB l lB l lB l lB l lB l lB l. T{ Command-Line Format T}:T{ --max-rows=# T} T{ Type T}:T{ Integer T} T{ Default Value T}:T{ 0 T} T{ Minimum Value T}:T{ 0 T} T{ Maximum Value T}:T{ 4294967295 T} T{ Unit T}:T{ bytes T} .TE .sp 1 Import only this number of input data rows; the default is 0, which imports all rows\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-missing\-ai\-column\fR .TS allbox tab(:); lB l lB l lB l. T{ Command-Line Format T}:T{ --missing-ai-column='name' T} T{ Type T}:T{ Boolean T} T{ Default Value T}:T{ FALSE T} .TE .sp 1 This option can be employed when importing a single table, or multiple tables\&. When used, it indicates that the CSV file being imported does not contain any values for an AUTO_INCREMENT column, and that \fBndb_import\fR should supply them; if the option is used and the AUTO_INCREMENT column contains any values, the import operation cannot proceed\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-monitor\fR=\fI#\fR .TS allbox tab(:); lB l lB l lB l lB l lB l lB l. T{ Command-Line Format T}:T{ --monitor=# T} T{ Type T}:T{ Integer T} T{ Default Value T}:T{ 2 T} T{ Minimum Value T}:T{ 0 T} T{ Maximum Value T}:T{ 4294967295 T} T{ Unit T}:T{ bytes T} .TE .sp 1 Periodically print the status of a running job if something has changed (status, rejected rows, temporary errors)\&. Set to 0 to disable this reporting\&. Setting to 1 prints any change that is seen\&. Higher values reduce the frequency of this status reporting\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-ndb\-connectstring\fR .TS allbox tab(:); lB l lB l lB l. T{ Command-Line Format T}:T{ --ndb-connectstring=connection_string T} T{ Type T}:T{ String T} T{ Default Value T}:T{ [none] T} .TE .sp 1 Set connection string for connecting to \fBndb_mgmd\fR\&. Syntax: [nodeid=\fIid\fR;][host=]\fIhostname\fR[:\fIport\fR]\&. Overrides entries in NDB_CONNECTSTRING and my\&.cnf\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-ndb\-mgm\-tls\fR .TS allbox tab(:); lB l lB l lB l lB l. T{ Command-Line Format T}:T{ --ndb-mgm-tls=level T} T{ Type T}:T{ Enumeration T} T{ Default Value T}:T{ relaxed T} T{ Valid Values T}:T{ .PP relaxed .PP strict T} .TE .sp 1 Sets the level of TLS support required to connect to the management server; one of relaxed or strict\&. relaxed (the default) means that a TLS connection is attempted, but success is not required; strict means that TLS is required to connect\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-ndb\-mgmd\-host\fR .TS allbox tab(:); lB l lB l lB l. T{ Command-Line Format T}:T{ --ndb-mgmd-host=connection_string T} T{ Type T}:T{ String T} T{ Default Value T}:T{ [none] T} .TE .sp 1 Same as \fB\-\-ndb\-connectstring\fR\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-ndb\-nodeid\fR .TS allbox tab(:); lB l lB l lB l. T{ Command-Line Format T}:T{ --ndb-nodeid=# T} T{ Type T}:T{ Integer T} T{ Default Value T}:T{ [none] T} .TE .sp 1 Set node ID for this node, overriding any ID set by \fB\-\-ndb\-connectstring\fR\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-ndb\-optimized\-node\-selection\fR .TS allbox tab(:); lB l. T{ Command-Line Format T}:T{ --ndb-optimized-node-selection T} .TE .sp 1 Enable optimizations for selection of nodes for transactions\&. Enabled by default; use \fB\-\-skip\-ndb\-optimized\-node\-selection\fR to disable\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-ndb\-tls\-search\-path\fR .TS allbox tab(:); lB l lB l lB l lB l. T{ Command-Line Format T}:T{ --ndb-tls-search-path=list T} T{ Type T}:T{ Path name T} T{ Default Value (Unix) T}:T{ $HOME/ndb-tls T} T{ Default Value (Windows) T}:T{ $HOMEDIR/ndb-tls T} .TE .sp 1 Specify a list of directories to search for a CA file\&. On Unix platforms, the directory names are separated by colons (:); on Windows systems, the semicolon character (;) is used as the separator\&. A directory reference may be relative or absolute; it may contain one or more environment variables, each denoted by a prefixed dollar sign ($), and expanded prior to use\&. .sp Searching begins with the leftmost named directory and proceeds from left to right until a file is found\&. An empty string denotes an empty search path, which causes all searches to fail\&. A string consisting of a single dot (\&.) indicates that the search path limited to the current working directory\&. .sp If no search path is supplied, the compiled\-in default value is used\&. This value depends on the platform used: On Windows, this is \endb\-tls; on other platforms (including Linux), it is $HOME/ndb\-tls\&. This can be overridden by compiling NDB Cluster using \fB\-DWITH_NDB_TLS_SEARCH_PATH\fR\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-no\-asynch\fR .TS allbox tab(:); lB l. T{ Command-Line Format T}:T{ --no-asynch T} .TE .sp 1 Run database operations as batches, in single transactions\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-no\-defaults\fR .TS allbox tab(:); lB l. T{ Command-Line Format T}:T{ --no-defaults T} .TE .sp 1 Do not read default options from any option file other than login file\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-no\-hint\fR .TS allbox tab(:); lB l. T{ Command-Line Format T}:T{ --no-hint T} .TE .sp 1 Do not use distribution key hinting to select a data node\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-opbatch\fR=\fI#\fR .TS allbox tab(:); lB l lB l lB l lB l lB l lB l. T{ Command-Line Format T}:T{ --opbatch=# T} T{ Type T}:T{ Integer T} T{ Default Value T}:T{ 256 T} T{ Minimum Value T}:T{ 1 T} T{ Maximum Value T}:T{ 4294967295 T} T{ Unit T}:T{ bytes T} .TE .sp 1 Set a limit on the number of operations (including blob operations), and thus the number of asynchronous transactions, per execution batch\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-opbytes\fR=\fI#\fR .TS allbox tab(:); lB l lB l lB l lB l lB l lB l. T{ Command-Line Format T}:T{ --opbytes=# T} T{ Type T}:T{ Integer T} T{ Default Value T}:T{ 0 T} T{ Minimum Value T}:T{ 0 T} T{ Maximum Value T}:T{ 4294967295 T} T{ Unit T}:T{ bytes T} .TE .sp 1 Set a limit on the number of bytes per execution batch\&. Use 0 for no limit\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-output\-type\fR=\fIname\fR .TS allbox tab(:); lB l lB l lB l lB l. T{ Command-Line Format T}:T{ --output-type=name T} T{ Type T}:T{ Enumeration T} T{ Default Value T}:T{ ndb T} T{ Valid Values T}:T{ null T} .TE .sp 1 Set the output type\&. ndb is the default\&. null is used only for testing\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-output\-workers\fR=\fI#\fR .TS allbox tab(:); lB l lB l lB l lB l lB l. T{ Command-Line Format T}:T{ --output-workers=# T} T{ Type T}:T{ Integer T} T{ Default Value T}:T{ 2 T} T{ Minimum Value T}:T{ 1 T} T{ Maximum Value T}:T{ 4294967295 T} .TE .sp 1 Set the number of threads processing output or relaying database operations\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-pagesize\fR=\fI#\fR .TS allbox tab(:); lB l lB l lB l lB l lB l lB l. T{ Command-Line Format T}:T{ --pagesize=# T} T{ Type T}:T{ Integer T} T{ Default Value T}:T{ 4096 T} T{ Minimum Value T}:T{ 1 T} T{ Maximum Value T}:T{ 4294967295 T} T{ Unit T}:T{ bytes T} .TE .sp 1 Align I/O buffers to the given size\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-pagecnt\fR=\fI#\fR .TS allbox tab(:); lB l lB l lB l lB l lB l. T{ Command-Line Format T}:T{ --pagecnt=# T} T{ Type T}:T{ Integer T} T{ Default Value T}:T{ 64 T} T{ Minimum Value T}:T{ 1 T} T{ Maximum Value T}:T{ 4294967295 T} .TE .sp 1 Set the size of I/O buffers as multiple of page size\&. The CSV input worker allocates buffer that is doubled in size\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-polltimeout\fR=\fI#\fR .TS allbox tab(:); lB l lB l lB l lB l lB l lB l. T{ Command-Line Format T}:T{ --polltimeout=# T} T{ Type T}:T{ Integer T} T{ Default Value T}:T{ 1000 T} T{ Minimum Value T}:T{ 1 T} T{ Maximum Value T}:T{ 4294967295 T} T{ Unit T}:T{ ms T} .TE .sp 1 Set a timeout per poll for completed asynchronous transactions; polling continues until all polls are completed, or until an error occurs\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-print\-defaults\fR .TS allbox tab(:); lB l. T{ Command-Line Format T}:T{ --print-defaults T} .TE .sp 1 Print program argument list and exit\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-rejects\fR=\fI#\fR .TS allbox tab(:); lB l lB l lB l lB l lB l. T{ Command-Line Format T}:T{ --rejects=# T} T{ Type T}:T{ Integer T} T{ Default Value T}:T{ 0 T} T{ Minimum Value T}:T{ 0 T} T{ Maximum Value T}:T{ 4294967295 T} .TE .sp 1 Limit the number of rejected rows (rows with permanent errors) in the data load\&. The default is 0, which means that any rejected row causes a fatal error\&. Any rows causing the limit to be exceeded are added to the \&.rej file\&. .sp The limit imposed by this option is effective for the duration of the current run\&. A run restarted using \fB\-\-resume\fR is considered a \(lqnew\(rq run for this purpose\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-resume\fR .TS allbox tab(:); lB l. T{ Command-Line Format T}:T{ --resume T} .TE .sp 1 If a job is aborted (due to a temporary db error or when interrupted by the user), resume with any rows not yet processed\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-rowbatch\fR=\fI#\fR .TS allbox tab(:); lB l lB l lB l lB l lB l lB l. T{ Command-Line Format T}:T{ --rowbatch=# T} T{ Type T}:T{ Integer T} T{ Default Value T}:T{ 0 T} T{ Minimum Value T}:T{ 0 T} T{ Maximum Value T}:T{ 4294967295 T} T{ Unit T}:T{ rows T} .TE .sp 1 Set a limit on the number of rows per row queue\&. Use 0 for no limit\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-rowbytes\fR=\fI#\fR .TS allbox tab(:); lB l lB l lB l lB l lB l lB l. T{ Command-Line Format T}:T{ --rowbytes=# T} T{ Type T}:T{ Integer T} T{ Default Value T}:T{ 262144 T} T{ Minimum Value T}:T{ 0 T} T{ Maximum Value T}:T{ 4294967295 T} T{ Unit T}:T{ bytes T} .TE .sp 1 Set a limit on the number of bytes per row queue\&. Use 0 for no limit\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-stats\fR .TS allbox tab(:); lB l. T{ Command-Line Format T}:T{ --stats T} .TE .sp 1 Save information about options related to performance and other internal statistics in files named *\&.sto and *\&.stt\&. These files are always kept on successful completion (even if \fB\-\-keep\-state\fR is not also specified)\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-state\-dir\fR=\fIname\fR .TS allbox tab(:); lB l lB l lB l. T{ Command-Line Format T}:T{ --state-dir=path T} T{ Type T}:T{ String T} T{ Default Value T}:T{ . T} .TE .sp 1 Where to write the state files (\fItbl_name\fR\&.map, \fItbl_name\fR\&.rej, \fItbl_name\fR\&.res, and \fItbl_name\fR\&.stt) produced by a run of the program; the default is the current directory\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-table=\fR\fB\fIname\fR\fR .TS allbox tab(:); lB l lB l lB l. T{ Command-Line Format T}:T{ --table=name T} T{ Type T}:T{ String T} T{ Default Value T}:T{ [input file base name] T} .TE .sp 1 By default, \fBndb_import\fR attempts to import data into a table whose name is the base name of the CSV file from which the data is being read\&. You can override the choice of table name by specifying it with the \fB\-\-table\fR option (short form \fB\-t\fR)\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-tempdelay\fR=\fI#\fR .TS allbox tab(:); lB l lB l lB l lB l lB l lB l. T{ Command-Line Format T}:T{ --tempdelay=# T} T{ Type T}:T{ Integer T} T{ Default Value T}:T{ 10 T} T{ Minimum Value T}:T{ 0 T} T{ Maximum Value T}:T{ 4294967295 T} T{ Unit T}:T{ ms T} .TE .sp 1 Number of milliseconds to sleep between temporary errors\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-temperrors\fR=\fI#\fR .TS allbox tab(:); lB l lB l lB l lB l lB l. T{ Command-Line Format T}:T{ --temperrors=# T} T{ Type T}:T{ Integer T} T{ Default Value T}:T{ 0 T} T{ Minimum Value T}:T{ 0 T} T{ Maximum Value T}:T{ 4294967295 T} .TE .sp 1 Number of times a transaction can fail due to a temporary error, per execution batch\&. The default is 0, which means that any temporary error is fatal\&. Temporary errors do not cause any rows to be added to the \&.rej file\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-verbose\fR, \fB\-v\fR .TS allbox tab(:); lB l lB l lB l. T{ Command-Line Format T}:T{ --verbose[=#] T} T{ Type T}:T{ Boolean T} T{ Default Value T}:T{ false T} .TE .sp 1 Enable verbose output\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-usage\fR .TS allbox tab(:); lB l. T{ Command-Line Format T}:T{ --usage T} .TE .sp 1 Display help text and exit; same as \fB\-\-help\fR\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-version\fR .TS allbox tab(:); lB l. T{ Command-Line Format T}:T{ --version T} .TE .sp 1 Display version information and exit\&. .RE .PP As with LOAD DATA, options for field and line formatting much match those used to create the CSV file, whether this was done using SELECT INTO \&.\&.\&. OUTFILE, or by some other means\&. There is no equivalent to the LOAD DATA statement STARTING WITH option\&. .SH "COPYRIGHT" .br .PP Copyright \(co 1997, 2024, Oracle and/or its affiliates. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. .PP You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. .sp .SH "SEE ALSO" For more information, please refer to the MySQL Reference Manual, which may already be installed locally and which is also available online at http://dev.mysql.com/doc/. .SH AUTHOR Oracle Corporation (http://dev.mysql.com/).