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.
Commands | Arguments |
---|---|
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 |
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. |
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. |
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. |
runsqlloader | The runsqlloader argument only applies to import commands (-command i). If specified, the Oracle sqlldr program will be used to load the CSV file instead of a java procedure. If you have sqlldr installed on your system the sqlldr is faster than the java procedure. |
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. |
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. |
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. |
whereClause | Only used when tableName is specified and domain_name is omitted. |
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. |
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. |
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. |
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. |
remoteHost | Only meaningful for the “x” commands, specifies that the exported data, rather than being delivered to a local file, should be pushed to a remote Oracle Transportation Management instance, where this parameter’s value is the host name of the remote Transportation and Global Trade Management Cloud application server. If this parameter is specified, the remoteUser, remotePassword, and remoteCommand parameters are also needed. |
remoteUser | Only meaningful if remoteHost is specified. Specifies the Transportation and Global Trade Management Cloud username for logging into the remote Oracle Transportation Management system for performing the batch transfer. |
remotePassword | Only meaningful if remoteHost is specified. Specifies the Transportation and Global Trade Management Cloud password for logging into the remote Oracle Transportation Management system for performing the batch transfer. |
remoteCommand | Only meaningful if remoteHost is specified. Specifies the CSVUtil command (as defined for the command parameter) to execute on the remote system for receiving the transfer. Note that this cannot be one of the “x” (export) commands, but only one of the insert, update, or delete commands (“I”, “ii”, “iu”, “u”, “uu”, “d”, or “dd”), since this remote command is receiving the data exported locally. |
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. |