18.1 Creating Applications with Data Loading Capability
Create applications with data loading capability to enable end users to dynamically import data into a table within any schema to which they have access.
- About Creating a Page with Data Loading Capability
Add data loading capability to an application by creating a Data Load Definition and then a Data Load page. - Creating a Data Load Definition
Create a Data Load Definition in Shared Components. - Creating a Data Loading Page Using the Create Page Wizard
If a Data Load Definition exists, run the Create Page Wizard to add a Data Loading page. - Editing a Data Load Definition
Edit a Data Load Definition in Shared Components. - Copying or Subscribing to a Data Load Definition
Copy a Data Load Definition from another application. When copying a Data Load Definition from another app, you can also subscribe to it. - Example: Log Errors to a DML Error Log
Edit the Data Load Definition so that errors are logged into a DML error log.
Parent topic: Managing Application Data
18.1.1 About Creating a Page with Data Loading Capability
Add data loading capability to an application by creating a Data Load Definition and then a Data Load page.
Tip:
To see Data Load Definition examples, install the Sample Data Loading app from the Gallery. See Using the App Gallery.A Data Load Definition is comprised of a Data Load Definition, Data Profile, and Data Profile Columns. Data can be loaded either to an existing table in your schema or to a collection. You can define SQL Expression, SQL Query, Lookups, or Transformation Rules for each data profile column. These definitions are used in the Native Data Loading page process type.
When you create a Data Load Definition, the wizard prompts you to add a Data Loading page in your application. However, if a Data Load definition exists, you can also add a Data Loading page later by running the Create Page Wizard. A Data Loading page consists of a single page with a Native Data Loading page process which enables users to upload data from a file or by copy and paste, preview the data, and then upload the data.
Key features of application new data loading include:
-
New application data loading supports
CSV
,XLSX
,XML
, andJSON
formats. -
Column mapping occurs at design time, removing the burden for end users.
-
Flexible column mappings based on simple names or regular expressions.
-
Data conversion with transformation rules or lookup queries.
-
Easy work flow for end users: upload the file, verify the preview, and load data.
-
CSV
,XLSX
,XML
, andJSON
data formats can be loaded to tables or collections. -
Configure data loading to Append, Merge or Replace data, with or without Error Handling.
-
Simple new Process Type Data Loading: Customize Data Loading pages as you wish.
-
APEX_DATA_LOADING
PL/SQL API available for custom processing. -
Maximum number of columns to load is 300. Note that Legacy data load supports up to 45.
Note:
A Data Load Wizard is not designed or intended to load hundreds of thousands of rows of data. While it is possible to use a Data Load Wizard to load this high volume of data, you may encounter performance issues with both transmitting and loading large data files. Tools like Oracle SQL Developer and Oracle SQL*Loader are better suited to loading large volumes of data.
Supported Data Types
New Data Load supported data types:
-
VARCHAR2
-
NUMBER
-
DATE
-
TIMESTAMP
-
TIMESTAMP WITH LOCAL TIMEZONE
-
TIMESTAMP WITH TIMEZONE
-
CLOB
See Also:
Creating a Legacy Data Load PageParent topic: Creating Applications with Data Loading Capability
18.1.2 Creating a Data Load Definition
Create a Data Load Definition in Shared Components.
The Create Data Load definition wizard supports uploading of the
following sample file formats: CSV
, XLSX
,
XML
or JSON
. The uploaded file format is saved
as data load definition data profile format. This format dictates the type of file
end users can upload. For example, if you create a data load definition using a CSV
sample file, only TXT
or CSV
file types can be
uploaded from a page using the data load definition. Similarly, if you create a data
load definition using a XLSX
sample file, only
XLSX
file types can be uploaded from a page using the data load
definition. The following task includes sample images in which the Data Load
Definition is created on the EMP
table using EMP
.csv
file.
Note:
You can load this sample table by installing theEMP/ DEPT
Sample Dataset. See Using Sample Datasets in Oracle APEX SQL Workshop
GuideTo create a Data Load Definition:
See Also:
Creating ApplicationsParent topic: Creating Applications with Data Loading Capability
18.1.3 Creating a Data Loading Page Using the Create Page Wizard
If a Data Load Definition exists, run the Create Page Wizard to add a Data Loading page.
CSV
. The type of file users can upload depends on the data
load definition data profile format.
To create a Data Loading page by running the Create Page Wizard:
Parent topic: Creating Applications with Data Loading Capability
18.1.4 Editing a Data Load Definition
Edit a Data Load Definition in Shared Components.
A Data Load Definition is comprised of a target data load table, loading method, error handling attributes, and data profile.
To edit a Data Load Definition:
Parent topic: Creating Applications with Data Loading Capability
18.1.5 Copying or Subscribing to a Data Load Definition
Copy a Data Load Definition from another application. When copying a Data Load Definition from another app, you can also subscribe to it.
Tip:
Subscriptions enable developers to reuse shared components across several applications in a workspace. To learn more about subscriptions, see Using Shared Component Subscriptions.To copy copy or subscribe to Data Load Definition:
- Navigate to the Data Load Definitions page:
- From the Tasks list, select Copy from another app.
- Copy From:
- Copy From Application - Select an application from which to copy the data load definition.
- Click Next.
- Copy:
- Click Copy Data Load Definition.
Parent topic: Creating Applications with Data Loading Capability
18.1.6 Example: Log Errors to a DML Error Log
Edit the Data Load Definition so that errors are logged into a DML error log.
The following example demonstrates how to edit a Data Load Definition
that loads data into the EMP
table. If the data load fails, errors
are logged into a DML error log named ERR$_EMP
.
To edit the Data Load Definition and log errors are logged into a DML error log:
Create a DML error log:
Edit the Data Load Definition and change the Loading Method and define the Error Handling:
Create another Data Loading page:
Parent topic: Creating Applications with Data Loading Capability