22.5 GET_COLUMNS Function

This function returns the columns of a parser profile as a table in order to be consumed by Oracle APEX components.

Syntax

APEX_DATA_PARSER.GET_COLUMNS (
    p_profile             IN CLOB )
    RETURN apex_t_parser_columns PIPELINED;

Parameter

Parameter Description
p_profile File profile to be used for parsing. The file profile might have been computed in a previous parse() or discover() invocation.

Returns

Returns profile column information as rows of apex_t_parser_columns.

Example

The following example uses discover() to compute a file profile and then get_columns() to return the list of columns.

select *
      from table(
                  apex_data_parser.get_columns(
                      apex_data_parser.discover(
                          p_content => {BLOB containing XLSX file},
                          p_file_name=>'large.xlsx' )));

     COLUMN_POSITION COLUMN_NAME   DATA_TYPE   FORMAT_MASK      
     --------------- ------------- ----------- ------------------
                   1 C0            NUMBER                       
                   2 FIRST_NAME    VARCHAR2                     
                   3 LAST_NAME     VARCHAR2                     
                   4 GENDER        VARCHAR2                     
                   5 COUNTRY       VARCHAR2                     
                   6 AGE           NUMBER                       
                   7 DATE_         DATE        DD"/"MM"/"YYYY   
                   8 ID            NUMBER