17 Loading External Data
Load external data from Excel, XML, JSON, or CSV files using declarative pages, page processes, or PL/SQL APIs.
Create a Data Load Definition to set up a profile that describes how external data in
Excel, XML, JSON, or CSV files should be loaded. Use it to load external data into a
table or collection:
- declaratively – using the native Data Load page process, or
- programmatically – with the
LOAD_DATAfunction in theAPEX_DATA_LOADINGpackage.
Pair the file profile it represents with APEX_DATA_PARSER.PARSE to preview data or process it in custom ways. The same function can also infer a file profile at runtime to visualize or process external data with an unknown structure.
Create a Data Loading page using the wizard that lets users upload an external data file, preview the data, and load it. It combines all of the above features. When necessary, the APEX_ZIP package lets you process the contents of a compressed archive for bulk data loading use cases.
- Exploring External Data Examples
Review external employee data examples in Excel, CSV, JSON, and XML formats. - Creating a Data Load Definition
Create a Data Load Definition using the wizard in Shared Components. - Augmenting Data Load Profile Columns
Add data profile columns to a Data Load Definition using SQL expressions or queries. - Generating and Using a Data Loading Page
Generate a Data Loading page with the Create Page Wizard to let users load data by choosing a file. - Parsing Data Without Data Load Definition
Parse external data without a Data Load Definition by letting APEX discover the file structure at runtime. - Loading Multiple Files Including ZIPs
Load employee data from multiple uploaded files, including ZIP archives, using Data Load Definitions and PL/SQL.