dbupdatelobs - Update LOBs

dbupdatelobs -I "InputDirectory" [OPTIONS] dataArea [name ...]

dbupdatelobs -o outputDir --createinputfile FIELDS [OPTIONS] dataArea [name ...]

You can also use the following options for CSV formatting:

[-UW] [-D datePattern] [-E encoding] [-m delimiter] [-O isoDateTimePattern] [-s separator] [-S decSep] [-T timePattern]

If you use -D datePattern , you can also use the following option:

[-L localeName]

The dbupdatelobs utility allows you to update large object data (LOBs) for Landmark business objects. The utility applies to persistent fields of type Text, BinaryObject, and BinaryDocument (such as resume or image files). It thus provides a means to load the LOBs into the database more quickly than using a Landmark application to load them one by one.

To update LOBS with the dbupdatelobs utility, you must perform three main steps:

  1. Run dbupdatelobs with the --createinputfile parameter in order to create a template of a CSV file for a single business class. This CSV file will contain the LOB fields with no values. You then populate this CSV file with absolute file references to LOBS in the file system. If a file reference is not provided, no database change is made for that field. If you want to delete a LOB, you can specify a reference to a zero-length file.

    When you run dbupdatelobs with the --createinputfile parameter, you also need to specify the fields needed to locate the specific row to be updated with file references. The CSV input file must include all fields of at least one index set that does not allow duplicates. These fields will not be updated. They are only to identify the records. You can also add more non-LOBs fields to aid in identifying the records to update. Only LOB fields will be updated.

  2. Run dbupdatelobs in validation mode (-IV) in order to check if the utility can locate both the record in which to load the LOBs and can locate the binary files based on the file references.

  3. Run dbupdatelobs in update mode (-I) in order to load the LOBs into the database. A LOB's associated MimeType and DocumentTitle type fields will be implicitly updated if they exist just as they would if you were to import the LOB through the application. Any errors will be written to an error zip file that contains CSV files with the problem records.

Guidelines:

  • The input files must be in CSV (comma-separated-value) format.

  • The input files must have headers.

  • Input files must include the file references for the LOBs and all the fields of a unique index that does allow duplicates.

  • The file references must be in the form of an absolute path.

  • Extra non-LOB fields are permitted in the input file, but will not be updated.

  • Blank file references are ignored.

  • A reference to a zero-length file causes the LOB's value to be deleted.

  • A LOB's associated MimeType and DocumentTitle type fields will be up dated if they exist.

Program Option Description

-I inputDirectory

(uppercase i)

Import the data from CSV files in the specified directory.
-o outputDir Indicate the directory where the CSV template file is to be placed. Use with the --createinputfile parameter.
--createinputfile=FIELDS

Export a comma-separated-value file with the requested fields to use as the basis of an input file. Valid only with the -o option

Assumes --noerrorfile, and will fail if --errorfile is specified.

-f "filterString" or --filter=filterString

Limit the output based on the specified filter value for the index keys of the file. The filter can be a conditional expression, such as

-f "fileName.fieldName=1"

or

-f "relationshipName.fieldName=1"

-b or --brief Brief mode; prints a summary for each file.
-q or --quiet Quiet mode; display only errors; do not print informational messages.
-V Validate only. This checks if the referenced files and target records exist. You can also run dbupdatelobs with this option before adding the file references to the template file created with the --createinputfile parameter. This kind of trial run will indicate if sufficient index fields have been included to identify the records where you want to update a LOBs field.
-M nn The threshold in megabytes used to determine when to write large binary objects to a temporary file on disk during the import. The default is 20MB. If the import fails or is likely to fail because of memory issues from large binary objects, lower this threshold. If your system has sufficient resources, you can consider increasing the threshold in order to speed up the import. Use -1 to disable this setting.
-x transactionsize

Specify the transaction size, in number of records to be held in the buffer before committing or ending transactions.

This specification will override any other specification for the INSERTBUFSIZE parameter made in the db.cfg file.

--errorfile errorFile

The name of the zip file to contain CSV files listing any records that caused errors. Use with the -I or -IV options.

If you do not include either --errorfile or --noerrorfile, the utility will create error files in a zip file with the default name of dbupdatelobsErr*.zip, where * is a timestamp.

--noerrorfile Indicate that you do not want to produce an error file during the update or validate. Use with the -I or -IV options.
dataarea The data area to update data for.
name

A list of names of dictionary files, business classes, modules, database spaces, or business class patterns to execute the command against.

Use the prefixes file-, pattern-, space-, or module- to resolve ambiguity. Use prefix- and type- to select files by prefix name or types used. File names can be the long or classic name and can include ? and *. Specifying "!" anywhere in the list will complement the selected files. Specifying @path reads names from the file, one per line. A hyphen ( - ) indicates stdin. Wildcard characters may need to be quoted in the command line or they will be interpreted by the command processor. A :L on a file name selects the lobs table. A :B on a file name selects the base table.

CSV File Options
-U or --unixdata Use UNIX line separators.
-W or --windowsdata Use Windows line separators.
-D dateformat

Specify the date format that dates have in the input file. You need to use this option if the dates are not already in the format yyyyMMdd. When specifying the format, use uppercase M's to indicate the month format, and lowercase d's and y's to indicate the day and year formats, respectively. For example, MM/dd/yyyy is correct but mm/dd/yyyy is not correct.

For a full explanation of supported formats, see the Java API documentation for the java.text.SimpleDateFormat class.

-E encoding Specify the encoding that the CSV file has. The default is UTF-8 since dbexport creates files with UTF-8 encoding. If you have a CSV file, with a different encoding, use this option. Valid values are ISO-8859-1, windows-1252, and UTF-8.
-m delimiter Specify the field delimiter character.
-O or --iso ISO date and time patterns (overrides -D or -T)
-s separator

Specify the field separator character.

The default separator is a comma (,).

-S decimalSeparator Specify the decimal separator.
-T timeformat

Specify the time format that times have in the input file. You need to use this option if the times are not already in the format HHmmss. When specifying the format, use uppercase H's for the hour format, and m's, and s's to indicate the minute, and second formats, respectively.

For a full explanation of supported formats, see the Java API documentation for the java.text.SimpleDateFormat class.

-L localeName

Specify a locale in the format language[_COUNTRY[_variant]].

For example, en_US

Valid only with the -D option.