- --batch={integer}
Specifies the number of rows to submit in a batch. If you do not specify an insert procedure, rows of input are
sent in batches to maximize overall throughput. You can specify how many rows are sent in each batch using the
--batch flag. The default batch size is 200. If you use the --procedure flag, no
batching occurs and each row is sent separately.
- --blank={error | null | empty }
Specifies what to do with missing values in the input. By default, if a line contains a missing value, it is
interpreted as a null value in the appropriate datatype. If you do not want missing values to be interpreted as nulls,
you can use the --blank argument to specify other behaviors. Specifying --blank error results in an
error if a line contains any missing values and the line is not inserted. Specifying --blank empty
returns the corresponding "empty" value in the appropriate datatype. An empty value is interpreted as the
following:
Zero for all numeric columns
Zero, or the Unix epoch value, for timestamp columns
An empty or zero-length string for VARCHAR and VARBINARY columns
- -c, --charset={character-set}
Specifies the character set of the input file. The default character set is UTF-8.
- --columnsizelimit={integer}
Specifies the maximum size of quoted column input, in bytes. Mismatched quotation marks in the input can cause
csvloader to read all subsequent input — including line breaks — as part of the column. To avoid excessive
memory use in this situation, the flag sets a limit on the maximum number of bytes that will be accepted as input for
a column that is enclosed in quotation marks and spans multiple lines. The default is 16777216 (that is, 16MB).
- --credentials={properties-file}
Specifies a file that lists the username and password of the account to use when connecting to a database with
security enabled. This is useful when writing shell scripts because it avoids having to hardcode the password as plain
text in the script. The credentials file is interpreted as a Java properties file defining the properties
username and password. For example:
username: johndoe
password: 4tUn8
Because it is a Java properties file, you must escape certain special characters in the username or password,
including the colon or equals sign.
- --escape={character}
Specifies the escape character that must precede a separator or quotation character that is supposed to be
interpreted as a literal character in the CSV input. The default escape character is the backslash (\). This character
escapes the next character both inside and outside of quoted strings except when using the
default quote character, the double quotation ("). When using the default quote character, the escape character only
operates outside quoted strings; inside quoted strings, all characters are interpreted as literal characters except
two double quotation marks in a row, which are interpreted as a single double quote.
- -f, --file={file-specification}
Specifies the location of a CSV file to read as input. If you do not specify an input file, csvloader reads
input from standard input.
- --header
Specifies that the first line of the CSV file is a header row, containing the names of the columns. The column
names must match columns in the VoltDB table. However, by using --header, the columns can appear in a different order
in the CSV file from the order in the database schema. Note that you must specify all of the table column names in the
header. The arguments --header and --procedure are mutually exclusive.
- --kerberos={service-name}
Specifies the use of kerberos authentication when connecting to the database server(s). The service name
identifies the Kerberos client service module, as defined by the JAAS login configuration file.
- --limitrows={integer}
Specifies the maximum number of rows to be read from the input stream. This argument (along with --skip) lets
you load a subset of a larger CSV file.
- -m, --maxerrors={integer}
Specifies the target number of errors before csvloader stops processing input. Once csvloader encounters the
specified number of errors while trying to insert rows, it will stop reading input and end the process. Note that,
since csvloader performs inserts asynchronously, it often attempts more inserts before the target number of exceptions
are returned from the database. So it is possible more errors could be returned after the target is met. This argument
lets you conditionally stop a large loading process if more than an acceptable number of errors occur.
- --noquotechar
Disables the interpretation of quotation characters in the CSV input. All input other than the separator
character and line break will be treated as literal input characters.
- --nowhitespace
Specifies that the CSV input must not contain any whitespace between data values and separators. By default,
csvloader ignores extra space between values, quotation marks, and the value separators. If you use this argument, any
input lines containing whitespace will generate an error and not be inserted into the database.
- --password={text}
Specifies the password to use when connecting to the database. You must specify a username and password if
security is enabled for the database. If you specify a username with the --user argument but not the --password
argument, VoltDB prompts for the password. This is useful when writing shell scripts because it avoids having to
hardcode passwords as plain text in the script.
- --port={port-number}
Specifies the network port to use when connecting to the database. If you do not specify a port, csvloader uses
the default client port 21212.
- -p, --procedure={procedure-name}
Specifies a stored procedure to use for loading each record from the data file. The named procedure must exist
in the database schema and must accept the fields of the data record as input parameters. By default, csvloader uses a
custom procedure to batch multiple rows into a single insert operation. If you explicitly name a procedure, batching
does not occur.
- --quotechar={character}
Specifies the quotation character that is used to enclose values. By default, the quotation character is the
double quotation mark (").
- -r, --reportdir={directory}
Specifies the directory where csvloader writes the three output files. By default, csvloader writes output files
to the current working directory. This argument lets you redirect output to an alternative location.
- --s, --servers={server-id}[,...]
Specifies the network address of one or more nodes of a database cluster. When specifying an IPv6 address,
enclose the address in square brackets. By default, csvloader attempts to insert the CSV data into a database on the
local system (localhost). To load data into a remote database, use the --servers argument to specify the database
nodes the loader should connect to.
- --separator={character}
Specifies the character used to separate individual values in the input. By default, the separator character is
the comma (,).
- --skip={integer}
Specifies the number of lines from the input stream to skip before inserting rows into the database. This
argument (along with --limitrows) lets you load a subset of a larger CSV file.
- --ssl={ssl-config-file}
Specifies the use of TLS encryption when communicating with the server. Only necessary if the cluster is
configured to use TLS encryption for the external ports. See the section called “Using CLI Commands with TLS/SSL” for more information.
- --stopondisconnect
Specifies that if connections to all of the VoltDB servers are broken, the loader will stop. Normally, if the
connection to the database is lost, csvloader periodically attempts to reconnect until the servers come back online
and it can complete the loading process. However, you can use this argument to have the loader process stop if the
VoltDB cluster becomes unavailable.
- --strictquotes
Specifies that all values in the CSV input must be enclosed in quotation marks. If you use this argument, any
input lines containing unquoted values will generate an error and not be inserted into the database.
- --update
Specifies that existing records with a matching primary key are updated, rather than being rejected. By default,
csvloader attempts to create new records. The --update flag lets you load updates to existing records — and
create new records where the primary key does not already exist. To use --update, the table must
have a primary key.
- --user={text}
Specifies the username to use when connecting to the database. You must specify a username and password if
security is enabled for the database.
- -z, --timezone={text}
Specifies the timezone to use when interpreting input for a TIMESTAMP column You specify the timezone as a Java
TimeZone identifier. For example, you can specify a continent and region ("America/New_York") or a time zone acronym
("EST"). The --timezone qualifier is only valid when specifying a table name as the target; not when specifying a
stored procedure.