A-15 – HP Neoview Release 2.4 Software User Manual
Page 103
Example A-15 Control File: Load From File to Table Using Subset of Source Columns
*------------------------------------------------------------------------*/
/* Simple Load From File To Table With Only Subset Of Source Columns Used */
/*------------------------------------------------------------------------*/
/* DDL to be used to create target table
CREATE TABLE NVT.SN_NVT_SS
(
FN_tgt CHAR(12) CHARACTER SET ISO88591 DEFAULT 'Neo'
, LN_tgt CHAR(24) CHARACTER SET ISO88591 NO DEFAULT NOT NULL
, ADR_tgt CHAR(128) CHARACTER SET ISO88591 DEFAULT NULL
, ZP_tgt INT DEFAULT 0
, PH_tgt CHAR(10) CHARACTER SET ISO88591 DEFAULT NULL
, SOCIAL_tgt LARGEINT NO DEFAULT NOT NULL
, IN1_tgt CHAR(128) CHARACTER SET ISO88591 DEFAULT NULL
, IN2_tgt CHAR(128) CHARACTER SET ISO88591 DEFAULT 'Data Warehousing'
, PRIMARY KEY (SOCIAL_tgt ASC)
)
ATTRIBUTES ALIGNED FORMAT
HASH PARTITION ;
*/
version 1.0;
options
{
errors = 1000,
discards = 100,
rowsetsize = 5000
}
dataformats
{
dataformat1 delimited
records separated by
fields delimited by <,>
optionally qualified by <">
(
FIRST_NAME_src char,
LAST_NAME_src char,
ADDRESS_src char,
ZIP_src int,
PHONE_src char,
SSN_src largeint,
INFO1_src char,
INFO2_src char
)
dataformat2 sql fields
(
FN_tgt char,
LN_tgt char,
ADR_tgt char,
ZP_tgt int,
PH_tgt char,
SOCIAL_tgt largeint,
IN1_tgt char,
IN2_tgt char
)
}
sources {
src1 file "./data_files/sn_nvt.dat"
tgt1 jdbc table NEO.nvt.sn_nvt_ss options
(
system = "tra0101",
user = "testdbt",
password = "dbt",
datasource = "Admin_Load_DataSource",
url = "jdbc:hpt4jdbc://
)
}
maps {
map1 from dataformat1 to dataformat2
(
LN_tgt = LAST_NAME_src,
103