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 PLS-306 error

Arijit KanrarNov 10 2021 — edited Nov 10 2021

Hi All,
I have Oracle Application Express 20.1.0.00.13 running on an Oracle 18c XE instance (Oracle Database 18c Express Edition Release 18.0.0.0.0 - Production).
We have an Excel file which we want to upload to the DB to read and work on.
The Excel file is macro enabled (.xlsm) file which means we cannot use the Excel parsing features of APEX_DATA_PARSER as macro enabled Excel files dont work with it.
So we converted the data in the Excel file to a JSON and uploaded it to the DB. We want to parse the JSON using APEX_DATA_PARSER package.
But whenever we try to parse using the PARSE function from APEX_DATA_PARSER, we are getting a ORA-06553: PLS-306: wrong number or types of arguments in call to 'PARSE'.
As per the documentation, we have to either pass the file name or file type or file profile. We are passing in the file type. We also tried with just the file name but the same error appears.
To test out a simpler case, we tried parsing a generic JSON document but ended up getting the same error (screenshot below).
pls_306_error.jpgAs can be seen, even with a simple JSON, the error remains.
Can anyone throw any light on what's going wrong here?
Any help will be appreciated.
The query used here is:
select col001|| ':' || col002|| ':' || col003|| ':' || col004|| ':' || col005
from
table( apex_data_parser.parse(
p_content => '[{"firstName":"XYZ","lastName":"PQR","age":31,"gender":"male","heightCM":165},{"firstName":"ABC","lastName":"DEF","age":26,"gender":"male","heightCM":182}]',
p_file_type =>4,
p_skip_rows => 0) ) p
Note: I'm unable to make a multi-line code block in this thread on the new editor. So had to post the query as regular text.

This post has been answered by Carsten Czarski-Oracle on Nov 10 2021
Jump to Answer

Comments

Processing

Post Details

Added on Nov 10 2021
6 comments
52 views