Carlos,
here is the script
CREATE SET TABLE DEV_TCY_STG_VOL.STG_LAND_SHOP_OMNI_DTL,
NO FALLBACK,
NO BEFORE JOURNAL,
NO AFTER JOURNAL,
CHECKSUM = DEFAULT,
DEFAULT MERGEBLOCKRATIO
(
SEARCH_DATE VARCHAR(50),
SEARCH_YEAR VARCHAR(30),
REG_USER_ID VARCHAR(35),
PROD_CATEGORY VARCHAR(255),
MARKET CHAR(10),
BRAND CHAR(3),
INTERNET_SEARCH_WORD VARCHAR(255),
PRODUCTS VARCHAR(255),
START_DATE DATE,
END_DATE DATE,
DEP_PT_NO_OF_GUESTS VARCHAR(255),
SEARCH_PASSENGERS VARCHAR(255),
LEAD_TIME DECIMAL(38,0),
VISITS INTEGER,
UNIQUE_VISITORS INTEGER,
ORDERS INTEGER,
REVENUE DECIMAL(38,0),
LOAD_DATE TIMESTAMP,
MAPPING_NAME VARCHAR(50)
);
SET RECORD VARTEXT "," DISPLAY_ERRORS;
SET SESSION CHARTEXT "UTF8" ;
DEFINE
SEARCH_DATE (VARCHAR(50)),
SEARCH_YEAR (VARCHAR(30)),
REG_USER_ID (VARCHAR(35)),
PROD_CATEGORY (VARCHAR(255)),
INTERNET_SEARCH_WORD (VARCHAR(255)),
PRODUCTS (VARCHAR(255)),
START_DATE (VARCHAR(100)),
END_DATE (VARCHAR(100)),
DEP_PT_NO_OF_GUESTS (VARCHAR(255)),
SEARCH_PASSENGERS (VARCHAR(255)),
LEAD_TIME (VARCHAR(50)),
VISITS (VARCHAR(20)),
UNIQUE_VISITORS (VARCHAR(20)),
ORDERS (VARCHAR(20)),
REVENUE (VARCHAR(20))
File=SHOP_OMNI_DTL_LMN_UK.csv;
SHOW;
BEGIN LOADING STG_LAND_SHOP_OMNI_DTL
ERRORFILES STG_LAND_SHOP_OMNI_DTL_E1, STG_LAND_SHOP_OMNI_DTL_E2
CHECKPOINT 1000;
INSERT INTO STG_LAND_SHOP_OMNI_DTL
(SEARCH_DATE,SEARCH_YEAR,REG_USER_ID,MARKET,BRAND,INTERNET_SEARCH_WORD, PRODUCTS, START_DATE, END_DATE, DEP_PT_NO_OF_GUESTS,SEARCH_PASSENGERS,LEAD_TIME,VISITS,UNIQUE_VISITORS,ORDERS,REVENUE,LOAD_DATE,MAPPING_NAME)
VALUES
(:search_date
,:search_year
,:REG_USER_ID
,'en_GB'
,'LMN'
,:INTERNET_SEARCH_WORD
,:PRODUCTS
,:START_DATE
,:END_DATE
,:DEP_PT_NO_OF_GUESTS
,:SEARCH_PASSENGERS
,:LEAD_TIME
,:VISITS
,:UNIQUE_VISITORS
,:ORDERS
,:REVENUE
,CURRENT_TIMESTAMP
,'m_bb_flat_land_omni_dtl'
);
END LOADING;
QUIT;
Mallesh
↧