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!

apex_data_parser.parse into clob column

wowlJan 10 2023

Hi,
I'm trying to load a flat file into a table but some of the column values are greater than 4000 so I have the table set up as a clob. 
I'm trying to use the apex_data_parser.parse but the values get cut off at 3999 characters.
Is this a limit on the load or can I set something to the larger values into a clob.
I can see there is a P_FILE_PROFILE option but I can find anything on what to put in there apart from a "profile" but i'm not sure how that profile should look or if it would work.
Any help / examples would be greater appreciated or if apex_data_parser.parse cant deal with clobs then other ideas would also be appreciated.
The is what I've currently got, its a basic table and basic insert. I can either have the file uploaded into apex_application_temp_files or on the server (current attempt below)

create table mc_load
(id            number
,dynamic_fields clob
,dtype         clob);
insert into mc_load
(id
,dynamic_fields
,dtype)
select
 col001 id
,col011 dynamic_fields
,col012 dtype
from table
(
   apex_data_parser.parse
   (
       p_content  => file_to_blob('ONLINE_DIR', 'MC_WRAP.csv'),
       p_file_name => 'MC_WRAP.csv',
       p_skip_rows => 1
   )
);

Thanks in advance

This post has been answered by Carsten Czarski-Oracle on Jan 11 2023
Jump to Answer
Comments
Post Details
Added on Jan 10 2023
4 comments
1,046 views