Getting Started with SAND CDBMS : Using SAND CDBMS
Loading Data into Tables Using the SAND CDBMS Data Loader

 

Previous Topic:
Advanced Load Options: Analyzing and Manipulating Data with NDL++ Expressions
Chapter Index
Next Topic:
Running the SAND CDBMS Data Loader (ndlm)

 

Load Specification Script Examples

 

The following example takes a date field from the input file and decomposes it for import into additional columns for year, month, day. Time data is similarly subdivided into hour, month, and second fields.

Sample input record:

2002-05-1109:30:00

Load specification script:

IMPORT @datetime.dat
{
RECORD
{
DATE 10
YEAR (DATE:1:4)
MONTH (DATE:6:2)
DAY (DATE:9:2)
TIME 8 \n
HOUR (TIME:1:2)
MINUTE (TIME:4:2)
SECOND (TIME:7:2)
}
sample.datetime
{
DATE DATE
YEAR YEAR
MONTH MONTH
DAY DAY
TIME TIME
HOUR HOUR
MINUTE MINUTE
SECOND SECOND
}
}

Results:

DATE YEAR MONTH DAY TIME HOUR MINUTE SECOND
2002-05-11 2002 05 11 09:30:00 09 30 00

 

Previous Topic:
Advanced Load Options: Analyzing and Manipulating Data with NDL++ Expressions
Chapter Index
Next Topic:
Running the SAND CDBMS Data Loader (ndlm)