Preparing 12.10 BSON columns with DATE fields for upgrade

Before you upgrade from HCL OneDB™ 12.10 you must unload binary JSON (BSON) columns with DATE fields into JSON format so that you can load them into HCL OneDB 14.10

About this task

Perform the following steps on the 12.10 server.

Procedure

  1. Create an external table with a similar name as the original table and with JSON (instead of BSON) format for the date.
    For example, assume that the original table named datetab has a BSON column named i that has DATE fields in it. Use the following statement to create an empty, external table named ext_datetab that has a JSON column with DATE fields. The DATAFILES clause specifies the location and name of the delimited data file, which in this example is disk:/tmp/dat.unl.
    create external table ext_datetab (j int, i json) using
            (datafiles ("disk:/tmp/dat.unl"),
            format "delimited");
  2. Unload the data from the original table into the external table.
    For example:
    insert into ext_datetab select j, i::json from datetab;

What to do next

Complete other pre-migration steps. After you upgrade to the new server, you must load the JSON columns with DATE fields from the external table into a new table in BSON format.