Command Parameters for the csvutil.ctl File

The parameters in the table below can be specified on a line in the csvutil.ctl control file to indicate what database operation each line is to perform. Note that for database operations, the -command option must be specified; for import, update, and delete operations, the -dataFileName option is required. All other parameters are optional. Note that all the parameters for one operation must be on one line in the csvutil.ctl file; this file does not support line-wrapping.

CSVUtil Command and Arguments

Commands Arguments
clobEncoding The encoding of separate CLOB files you import. Only applicable if importing separate CLOB files. Common settings are ISO-8859-1 and UTF-8 (default). You especially need to consider this when you import data containing characters outside the 7-bit ASCII set. Also, consider the encoding of your database. If not specified, the value of the -encoding parameter is used for CLOB file imports.
command

Mandatory parameter, must specify one of the following commands:

i - insert CSV data into the database

ii - insert data, while suppressing unique key constraint violations

iu - attempts to insert data. If a primary key violation occurs, it updates the data. No delete statements are generated.

u - update data in the database

uu - update data, while suppressing “no data found” constraint violations

d- delete data from the database

dd- delete data, while suppressing “no data found” constraint violations

xcsv - export a CSV file

xcsvcd - export a multi-table CSV file with all subordinate child tables (e.g. shipment_stop, shipment_stop_d etc. for the shipment table). A table set called C.<table_name> controls which tables are considered to be children of a given table. For example, the C.SHIPMENT table set contains the following tables: shipment_stop, shipment_refnum, shipment_remark, etc. Similarly, the C.SHIPMENT_STOP table_set contains the shipment_stop_d table. If you log in as DBA.ADMIN in Oracle Transportation Management, you can use the Table Set Manager to modify the contents of the various C.* table sets.

xcsvpcd - export a multi-table CSV file with both parent and child data.

xcsvpd - export a multi-table CSV file with all referenced non-public foreign key records (parent data) required to load the record(s) in a foreign database.

xsql - export data as a script of SQL insert statements rather than a CSV file

dataFileName The dataFileName argument specifies the name of the file in the dataDir directory to either read or write. This field is required when importing a file, but is optional when exporting a file. If unspecified for an export, the output is written to System.out, and the glog.database.admin.csvUtilScript.csvOutput property will affect the output representation if CSV-embedded-in-XML format is chosen.
domain_name The domain_name parameter only applies to the export commands (xcsv and xsql). It specifies that only the data in that domain is to be exported, and only applies if the tableName parameter is used to specify which data will be exported; if the domain_name parameter is specified, the whereClause parameter will be ignored.
encoding The encoding of the file you import. Common settings are ISO-8859-1 (default) and UTF-8. You especially need to consider this when you import data containing characters outside the 7-bit ASCII set. Also, consider the encoding of your database.
excludeClobs Do not export clobs from the specified tables. The value is a comma-separated list of table names. Specifying a table name that does not appear in the export operation will be silently ignored.
excludeStageTables Do not export “staging” records created by the overall Transportation and Global Trade Management Cloud administrator’s account DBA.ADMIN. Only applies when the -tableName and -domain_name parameters are used.
excludeBeforeDate Do not export records whose original insertion date is prior to the specified date. Only applies when the -tableName and -domain_name parameters are used. By default, all records are exported (subject to other constraints) regardless of their initial creation date.
excludePublic Can be either Y (default) or N. If Y, records from the PUBLIC domain will not be exported.
includeChildren

If using the tableName and domain_name parameters, this specifies that records in “child” domains (with their domain name prefixed with the parent domain and a “/”) will also be included along with the parent domain records matching the domain_name parameter. For example,

-domain_name PARENT -includeChildren

would specify that records in the “PARENT”, “PARENT/CHILD”, and “PARENT/CHILD/GRANDCHILD” domains would be included in the export.

removeUndefinedColumns

CSVUtil supports, by default, the ability to ignore columns that are not defined in the target table. This is especially useful when exporting from a migrated database with deprecated columns, into a newly created database that does not have the deprecated columns. There is some performance impact for this feature. To deactivate the feature, use the following command line option:

-removeUndefinedColumns N

This option is only available when running CSVUtil directly on the command line. It is not available using either the web or ClientUtil.

selectList Only applicable when tableName is specified. Specifies choosing only rows from the table whose ordinal sequence numbers match the row numbers stored in the SELECT_LIST_D table for the GID specified as the value of this parameter.
sqlQuery If specified, then xcsv command is required and tableName, domain_name, and whereClause are ignored.
sqlFileName Operates the same as sqlQuery, but reads the query statement from the specified file instead of directly from the command line. Useful to avoid issues with the command shell and special characters.
tableName The tableName argument is only specified for the xcsv and xsql commands. This specifies the name of the database table to export. Can be null if sqlQuery is specified. Must be upper case.
tableSet If used, command can only be one of the “x” export commands, and this iteratively does CSVUtil operations with tableName for each of the tables listed in the specified table set. All other parameter rules are as for using the tableName parameter.
whereClause Only used when tableName is specified and domain_name is omitted.
xvalidate Can be either Y (default) or N. When set to Y, CSVUtil gives you more user-friendly diagnostics messages. When you set XValidate to Y, it also prevents values in the database from being wiped out if there are null values in the CSV. Setting the XValidate to N may wipe out values in the database or create an error if the CSV file is missing the value.