Creating a configuration file for dsbulk

Use a configuration file to set values for dsbulk.

The configuration file for setting values for dsbulk are written in a simple format, one option per line.

Load a configuration from a local file

############ MyConfFile.conf ############

dsbulk {
   # The name of the connector to use
   connector.name = "csv"
   # CSV field delimiter
   connector.csv.delimiter = "|"
   # The keyspace to connect to
   schema.keyspace = "myKeyspace"
   # The table to connect to
   schema.table = "myTable"
   # The field-to-column mapping
   schema.mapping = "0=name, 1=age, 2=email" 
   # Auth credentials
   driver.auth.username = "myAccount4"
   driver.auth.password = "dse#r0cks!"
}
Tip: Settings in the config file always start with the dsbulk prefix, while on the command line, this prefix must be omitted. To avoid confusion, configuration files are formatted with the following equivalent Human-Optimized Config Object Notation (HOCON) syntax: dsbulk { connector.name = "csv" ... }. For information about HOCON syntax, refer to this specification.
Important: DataStax recommends specifying username and password credentials in a configuration file, as shown in the example above, instead of on the command line. When done in a configuration file, the credentials are not displayed in subsequent commands such as ps -ef | grep cqlsh.

To use the configuration file, specify -f filename, where filename is the configuration file:

dsbulk load -f myConfFile.conf -url export.csv -k ks1 -t table1