This is an old revision of the document!


Administration: Omnidex Fundamentals

Raw Data Files

Record Layout

The record layout described in the CREATE TABLE statement must exactly match the record layout in the data file. This includes the order of the columns, as well as the datatypes and lengths of the columns. If these record layouts do not match, Omnidex will have problems reading the data from the data file. Omnidex cannot validate that the record layouts match, so it is always wise to retrieve a few rows to insure that the column definition and the data file line up properly.

In the CREATE TABLE statement, the record layout is specified using the COLUMN clause. The datatypes and lengths for these columns can be nearly any datatype supported by Omnidex. The only exceptions are the VARCHAR and CLOB datatypes, as these require that the underlying data also include stored data lengths. With raw data files, use STRING and CHARACTER datatypes instead.

CREATE TABLE          "STATES"
 physical             "dat/sta.dat"
 (
  "STATE"             CHARACTER(2),                
  "DESCRIPTION"       STRING(31),                 
  "STATE_CODE"        CHARACTER(2),                
  "REGION"            CHARACTER(2),                
  "COUNTRY"           CHARACTER(2),                
  "TAX_RATE"          FLOAT                       
 )
 IN                   "simple.xml";

Additional Resources

See also:

 
Back to top
admin/basics/rawdata/record.1298924673.txt.gz ยท Last modified: 2012/10/26 14:51 (external edit)