I have the following table and package code that i want to use to load a json file so what i did is include all the relevant columns on the table and package code but i get this error Compilation failed,line 28 (11:57:58)
PLS-00302: component 'GET_STRING' must be declaredCompilation failed,line 28 (11:57:58)
PL/SQL: Statement ignoredCompilation failed,line 29 (11:57:58)
PLS-00302: component 'GET_STRING' must be declaredCompilation failed,line 29 (11:57:58)
PL/SQL: Statement ignoredCompilation failed,line 33 (11:57:58)
PL/SQL: ORA-00904: "STYLE_HIGHLIGHT": invalid identifierCompilation failed,line 33 (11:57:58)
PL/SQL: SQL Statement ignored
there is the table and package code
create or replace PACKAGE BODY "EBA_DEMO_JSON_DATA_PKG" is
procedure load_json_data(p_json_data clob) is
v_id varchar2(200);
v_label varchar2(200);
v_color varchar2(100);
v_polygon sdo_geometry;
v_name varchar2(200);
v_style_url varchar2(200);
v_style_map_hash varchar2(200);
v_style_normal varchar2(200);
v_style_highlight varchar2(200);
v_json_object json_object_t;
v_json_array json_array_t;
v_json_element json_element_t;
begin
v_json_array := json_array_t.parse(p_json_data);
for v_i in 0..v_json_array.get_size - 1 loop
begin
v_json_object := treat(v_json_array.get(v_i) as json_object_t).get_object('data');
v_id := v_json_object.get_string('id');
v_label := v_json_object.get_string('label');
v_json_array := v_json_object.get_array('color');
v_color := v_json_array.get_string(0) || ',' || v_json_array.get_string(1) || ',' || v_json_array.get_string(2);
v_json_array := v_json_object.get_array('allData');
v_json_element := treat(v_json_array.get(0) as json_array_t).get(0);
v_json_object := treat(v_json_element as json_object_t).get_object('geometry');
v_polygon := sdo_util.from_json(v_json_object.to_clob);
v_name := treat(v_json_element as json_array_t).get(1).get_string();
v_style_url := treat(v_json_element as json_array_t).get(2).get_string();
v_style_map_hash := treat(v_json_element as json_array_t).get(3).to_clob();
v_style_normal := treat(treat(v_json_element as json_array_t).get(4) as json_object_t).get_string('normal');
v_style_highlight := treat(treat(v_json_element as json_array_t).get(4) as json_object_t).get_string('highlight');
insert into eba_demo_json_data(id, label, color, polygon, name, style_url, style_map_hash, style_normal, style_highlight)
values(v_id, v_label, v_color, v_polygon, v_name, v_style_url, v_style_map_hash, v_style_normal, v_style_highlight);
exception
when others then
dbms_output.put_line('error in json data: ' || sqlerrm);
end;
end loop;
end load_json_data;
end EBA_DEMO_JSON_DATA_PKG;
CREATE TABLE "EBA_DEMO_JSON_DATA"
( "ID" VARCHAR2(200),
"LABEL" VARCHAR2(200),
"COLOR" VARCHAR2(100),
"NAME" VARCHAR2(200),
"STYLE_URL" VARCHAR2(200),
"STYLE_MAP_HASH" VARCHAR2(200),
"STYLE_NORMAL" VARCHAR2(200),
"STYLE_HIGHLIGHT" VARCHAR2(200),
"POLYGON" "SDO_GEOMETRY"
)
VARRAY "POLYGON"."SDO_ELEM_INFO" STORE AS SECUREFILE LOB
VARRAY "POLYGON"."SDO_ORDINATES" STORE AS SECUREFILE LOB ;
Please assist in fixing the error