Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

APEX_DATA_PARSER.PARSE throws ORA-06553: PLS-306

Toufiq - Hexagon PPMMay 17 2021 — edited May 17 2021

Hi,
I am currently on APEX 20.2.
I am trying to parse an XLSX file using APEX_DATA_PARSER.PARSE utility.
This is how I am trying to accomplish this:

DECLARE
  l_blob     BLOB;
  l_filename   VARCHAR2 (1000);
  l_context   apex_exec.t_context;
  l_parameters  apex_exec.t_parameters;
BEGIN
  SELECT blob_content, filename
   INTO l_blob, l_filename
   FROM blob_table;

  apex_exec.ADD_PARAMETER (l_parameters, 'blob', l_blob);
  apex_exec.ADD_PARAMETER (l_parameters, 'filename', l_filename);

  l_context :=
    apex_exec.open_query_context (
      p_location     => apex_exec.c_location_local_db,
      p_sql_query    => q'#SELECT *
      FROM  TABLE(
        APEX_DATA_PARSER.parse(
          p_content     => :blob,
          p_file_name => :filename
     ))#',
      p_sql_parameters  => l_parameters);
  apex_json.open_object;
  apex_json.write_context (p_name => 'results', p_context => l_context);
  apex_json.close_object;
END;

The response is

sqlerrm:ORA-06553: PLS-306: wrong number or types of arguments in call to 'PARSE'

However, if I use APEX_DATA_PARSER.parse outside APEX_EXEC call, this works fine without issues.
Also the above code works fine in latest APEX 21.1 (on apex.oracle.com)
I am wondering if this is a known issue? If yes, is there any workaround or patch available?
Thankyou.
-- Toufiq

This post has been answered by Toufiq - Hexagon PPM on May 17 2021
Jump to Answer

Comments

Post Details

Added on May 17 2021
1 comment
416 views