Keyword Review

This information can be found for quick reference by typing in

timport -H

from the command line. Here is a review of keywords which can be used in a schema file, with a few items not previously covered.

Possible keywords:
     host      internet_address
     port      port_number
     user      texis_user
     group     texis_group
     pass      texis_password
     recdelim  record_delimiting_rex
     recexpr   record_matching_rex
     readexpr  record_delimiting_rex
     rexsize   record_max_size
     datefmt   date_format_string
     format    special_format
     stats
     multiple
     firstmatch
     allmatch  separator
     trimspace
     trimdollar
     keepfirst
     createtable boolean_value
     noid      texis_table_name
     database  texis_database_name
     droptable texis_table_name
     table     texis_table_name
     field     texis_field_name texis_sql_type tag_name_or_expr default
     ("field"  is not required if "stats" is used)

NOTES:

noid:
The keyword noid will suppress the default "id counter" field for the specified table. Normally the field "id counter" is inserted at the beginning of the table definition. This allows for a unique key field common to all your tables so you can do join operations. As a general rule it is practical to keep the id field in your tables. It needn't be called in the SELECT statement unless you wish to see it.

stats:
The keyword stats was a way to throw in 3DB style Fsize and Ftime that couldn't be done otherwise. File is thrown in automatically if no fields are specified to make making simple 3DB databases simpler. If you list other fields, you have to specify the File field to get it imported. Getting the automatic file is the same as saying:

field   File    varind          -

tags:
If you write your own REX expression, whatever is not excluded with \P or \F is included in the field.

recdelim:
It isn't a good idea to use a recdelim which is also a tag. If recdelim is the first tag you would have to exclude the entire expression with \F so that it would occur at start of the next buffer, not end of current buffer. If recdelim is the last tag, it should work without modification.

i/o explained:
With no recdelim Timport reads the entire input file into memory so there is no issue with freadex buffers. With recdelim, it uses freadex to sync to the delimiter. freadex will normally include the delimiter at the end of the buffer. If readexpr is specified freadex will sync to that instead of recdelim. Records may not span buffers. The size of the buffer is 1 megabyte by default. It may be adjusted using the recsize keyword. The program repeats the following till end of buffer:

    Scan the buffer for tags stopping at recdelim if set.

    If the first tag matches twice and multiple is set stop.

If your files will fit in memory and the first tag is the delimiter (like mail boxes) you don't need recdelim, just multiple.


Copyright © Thunderstone Software     Last updated: Apr 15 2024
Copyright © 2024 Thunderstone Software LLC. All rights reserved.