17.6 Loading Multiple Files Including ZIPs
Load employee data from multiple uploaded files, including ZIP archives, using Data Load Definitions and PL/SQL.
Suppose HR representatives need to load external employee data from multiple files
at a time. They work with different supplier systems that provide the data in Excel
format, CSV, JSON, and XML. Sometimes multiple files arrive in a ZIP archive. A Load
Employees page in the Woods HR app can meet this requirement by
combining:
- Data Load Definitions for each kind of source file (Excel, CSV, JSON, and XML)
- A File Upload page item with Allow Multiple Files enabled
- A custom
EMPLOYEES_FROM_FILESprocedure that uses:- A
FORloop over the uploaded files, calling APEX_DATA_LOADINGpackage to load data using a Data Load Definition, andAPEX_ZIPpackage to process the contents of a ZIP file
- A
- Adding XML, CSV, JSON Data Load Definitions
Add Data Load Definitions for XML, CSV, and JSON files that all load into the same target table. - Setting File Upload to Handle Multiple Files
Configure a File Upload item for multiple files and track processing results in hidden page items. - Processing Multiple Uploaded Files
Process multiple uploaded files with PL/SQL that chooses the right Data Load Definition and expands ZIP archives. - Uploading Multiple Data Load Files
Upload multiple employee data files and load them together, including files inside ZIP archives.
Parent topic: Loading External Data