17.5 Parsing Data Without Data Load Definition

Parse external data without a Data Load Definition by letting APEX discover the file structure at runtime.

In Previewing External Data Before Loading, the APEX_DATA_PARSER.PARSE function referenced an existing Data Load Definition by static ID. This is the most efficient approach if you know the structure of the data to load ahead of time. However, for more dynamic use cases you can also call PARSE to automatically discover the structure of a data file on the fly and return the data it contains in a row set with columns names from C001 to C300. It handles CSV, XML, JSON, and Excel data.

After running the PARSE function to retrieve the data, call:
  • GET_COLUMNS for a collection of the discovered column names and data types
  • GET_FILE_PROFILE to retrieve the file profile in JSON format

To work with the file profile information in a PL/SQL record structure instead, pass the file profile JSON to JSON_TO_PROFILE to get a T_FILE_PROFILE record structure.