Loading timestamps and date data

The Loader can load data into columns with timestamp and date data types. The data formats for timestamp and date data in the document are determined by patterns that can be customized. The user can edit an existing pattern or add more patterns to the existing list of patterns.

The data for a timestamp or date is checked against the available patterns (masks). The first pattern that matches the data is used to convert the data to the target timestamp format before loading it into the database.

  1. Customize the timestamp formats by modifying or adding masks in the new Loader customizer property file.

    The following input-timestamp masks are provided:

      InputTimeStampFormat.1 = yyyy-DD hh:mm:ss.SSSSSS
      InputTimeStampFormat.2 = yyyy-MM-dd hh:mm:ss.SSSSSS
      InputTimeStampFormat.3 = yyyy-DD-hh.mm.ss.SSSSSS
      InputTimeStampFormat.4 = yyyy-MM-dd-HH.mm.ss.SSSSSS
      InputTimeStampFormat.5 = yyyy-MM-dd-hh.mm.ss.SSSSSS
      InputTimeStampFormat.6 = yyyy-MM-dd HH:mm:ss.SSSSSS
      InputTimeStampFormat.7 = yyyy-DD HH:mm:ss.SSSSSS
    

    The default patterns for input-date formats are as follows:

      InputDateFormat.1 = MM-dd-yyyy
      InputDateFormat.2 = yyyy-dd-MM
      InputDateFormat.3 = yyyy-MM-dd 
      InputDateFormat.4 = MM/dd/yyyy
      InputDateFormat.5 = yyyy/dd/MM
      InputDateFormat.6 = yyyy-DD
    

    In general, output date and timestamp formats are not customized.

  2. Change or add timestamp and date masks. There are two customizable output-timestamp patterns.

    TimeStampFormat.JDBC
    Used when the Loader uses JDBC connections to perform an operation.

    The SQL import and delete methods of the Loader use JDBC connections for updating the database.

    TimeStampFormat.Load
    Used when the Loader uses the native utilities.

    The import and load methods of the Loader use native utilities.

    Specify masks in the sequence in which you want them to be compared with the input timestamp. If you add an input timestamp, you must use the next number in the current sequence.

    The patterns for formatting input data to the output for timestamp and date are as follows:

      TimeStampFormat.JDBC = yyyy-MM-dd hh:mm:ss.SSSSSS
      TimeStampFormat.Load = yyyy-MM-dd-hh.mm.ss.SSSSSS
    
      DateFormat.JDBC = yyyy-MM-dd
      DateFormat.Load = yyyy-MM-dd
    

Feedback