Setp 1)
Create a control file. Put that control file in Bin folder of the Custom top.
In ctl file specify the Data file and all.
Ex:
LOAD DATA
INFILE "$XXX_TOP/data/in/USG_AP_CREDIT_CARD_TRXN.csv"
BADFILE "$XXX_TOP/data/in/USG_AP_CREDIT_CARD_TRXN.bad"
DISCARDFILE "$XXX_TOP/data/in/USG_AP_CREDIT_CARD_TRXN.dsc"
APPEND
INTO TABLE XXX_AP_CREDIT_CARD_TRXN_STG
FIELDS TERMINATED BY "~"
OPTIONALLY ENCLOSED BY "'"
TRAILING NULLCOLS
( TRX_ID ,
VALIDATE_CODE ,
CARD_PROGRAM_ID ,
EXPENSED_AMOUNT ,
CARD_NUMBER ,
REFERENCE_NUMBER ,
TRANSACTION_TYPE ,
TRANSACTION_DATE DATE "DD-MON-RR" defaultif(transaction_date=blanks),
TRANSACTION_AMOUNT)
If you want pass the File name and path as a parameter:
INFILE ‘$FILE’ —File Name with path as a parameter at concurrent program
Step 2:
Create a executable type as SQL Loader Program. Specify application and CTL file name.
Step 3: Create Concurrent program and parameters .
Step 4: Add this concurrent program to appropriate Request set.
Step 5: Go to resposibility which uses that request set and run the concurrent program.
Create a control file. Put that control file in Bin folder of the Custom top.
In ctl file specify the Data file and all.
Ex:
LOAD DATA
INFILE "$XXX_TOP/data/in/USG_AP_CREDIT_CARD_TRXN.csv"
BADFILE "$XXX_TOP/data/in/USG_AP_CREDIT_CARD_TRXN.bad"
DISCARDFILE "$XXX_TOP/data/in/USG_AP_CREDIT_CARD_TRXN.dsc"
APPEND
INTO TABLE XXX_AP_CREDIT_CARD_TRXN_STG
FIELDS TERMINATED BY "~"
OPTIONALLY ENCLOSED BY "'"
TRAILING NULLCOLS
( TRX_ID ,
VALIDATE_CODE ,
CARD_PROGRAM_ID ,
EXPENSED_AMOUNT ,
CARD_NUMBER ,
REFERENCE_NUMBER ,
TRANSACTION_TYPE ,
TRANSACTION_DATE DATE "DD-MON-RR" defaultif(transaction_date=blanks),
TRANSACTION_AMOUNT)
If you want pass the File name and path as a parameter:
INFILE ‘$FILE’ —File Name with path as a parameter at concurrent program
Step 2:
Create a executable type as SQL Loader Program. Specify application and CTL file name.
Step 3: Create Concurrent program and parameters .
Step 4: Add this concurrent program to appropriate Request set.
Step 5: Go to resposibility which uses that request set and run the concurrent program.
No comments:
Post a Comment