I need to populate my EXTERNAL TABLE from a .csv file received as input. Within my .csv file I have 3 fields which are respectively:
- ORDER_DATE -START -END Which are with the following format:
- December 4, 2023
- December 4, 2023 8:00:46 PM
- December 4, 2023 9:00:46 PM
What I want is to find a way to populate the data within my external table with the following format:
- 4/12/2023
- 4/12/2023 08:00
- 4/12/2023 09:00
How can I do this?
this is how I created my EXTERNAL_TABLE:
CREATE TABLE EXT_TABLE
(
"JOB" VARCHAR2(255 BYTE) COLLATE "USING_NLS_COMP",
"ORDER_DATE" VARCHAR2(255 BYTE) COLLATE "USING_NLS_COMP",
"START" VARCHAR2(255 BYTE) COLLATE "USING_NLS_COMP",
"END" VARCHAR2(255 BYTE) COLLATE "USING_NLS_COMP"
) DEFAULT COLLATION "USING_NLS_COMP"
ORGANIZATION EXTERNAL
( TYPE ORACLE_LOADER
DEFAULT DIRECTORY "DATA_PUMP_DIR"
ACCESS PARAMETERS
( RECORDS DELIMITED BY DETECTED NEWLINE NOLOGFILE NOBADFILE NODISCARDFILE READSIZE=10000000 CREDENTIAL 'DWH'
FIELDS TERMINATED BY ';' OPTIONALLY ENCLOSED BY '"' CONVERT_ERROR REJECT_RECORD DATE_FORMAT DATE MASK 'YYYYMMDDHH24MISS' DATE_FORMAT TIMESTAMP MASK 'YYYYMMDDHH24MISSFF6' NOTRIM MISSING FIELD VALUES ARE NULL
)
LOCATION
( 'https://swiftobjectstorage.eu-frankfurt-1.oraclecloud.com/v1/frn2gep9qi8i/INPUT/myfile.csv'
)
)
REJECT LIMIT 25500000
PARALLEL ;