Monday, September 5, 2011

Converting Data Types with FastLoad


Converting Data Types with FastLoad

Converting data is easy. Just define the input data types in the input file. Then, FastLoad will compare that to the column definitions in the Data Dictionary and convert the data for you! But the cardinal rule is that only one data type conversion is allowed per column. In the example below, notice how the columns in the input file are converted from one data type to another simply by redefining the data type in the CREATE TABLE statement.
FastLoad allows six kinds of data conversions. Here is a chart that displays them:
IN FASTLOAD YOU MAY CONVERT
CHARACTER DATA
TO
NUMERIC DATA
FIXED LENGTH DATA
TO
VARIABLE LENGTH DATA
CHARACTER DATA
TO
DATE
INTEGERS
TO
DECIMALS
DECIMALS
TO
INTEGERS
DATE
TO
CHARACTER DATA
NUMERIC DATA
TO
CHARACTER DATA
Figure 4-4
When we said that converting data is easy, we meant that it is easy for the user. It is actually quite resource intensive, thus increasing the amount of time needed for the load. Therefore, if speed is important, keep the number of columns being converted to a minimum!

No comments:

Post a Comment