21.13 Import After Conversion with useFlexFields=false
After trying to import, error-log tables are created and queried to show import errors and imported documents.
The process of creating error logs and importing the input document sets (in
tables student_tab
, teacher_tab
, and
course_tab
) into the duality views created in Using the Converter with useFlexFields=false is exactly the same as in the simplified recipe case: see the example
"Creating Error Logs for No Outlier Use Case" and "Importing Document Sets, for No
Outlier Use Case" in Migrating To Duality, Simplified Recipe. But checking
the error logs for the default case tells a different story.
Example 21-33 Checking Error Logs from Import, for useFlexFields = false Case
As with the default case (see "Checking Error Logs from Import, for
Default Case" in Import After Default Conversion), import into the
student duality view logs an error for the type-occurrence outlier for field
age
with value "Nineteen"
, and no error is logged for
the teacher view.
But unlike the default case, import also logs an error for the missing
Notes
field. Field Notes is not mapped to any column, and since
there are no flex columns, the field is not supported by the duality view.
ORA_ERR_NUMBER$
---------------
ORA_ERR_MESG$
-------------
ORA_ERR_TAG$
------------
42555
ORA-42555: Cannot insert into JSON Relational Duality View 'COURSE': The input JSON document is invalid.
JZN-00651: field 'Notes' is unknown or undefined
Import Error
Select that culprit course document from the input course table:
SELECT * FROM "JANUS".course_tab
WHERE ROWID IN (SELECT ora_err_rowid$ FROM course_err_log);
DATA
----
{"courseId":"MATH101","name":"Algebra","creditHours":3,"students":[{"studentId":
1,"name":"Donald P."},{"studentId":5,"name":"Hye E."}],"teacher":{"teacherId":10
1,"name":"Abdul J."},"Notes":"Prerequisite for Advanced Algebra"}
We next use DBMS_JSON_DUALITY.validate_import_report
to report on any problems with documents that have been imported successfully. Unlike
the default case and the simplified recipe case, for the conversion with
useFlexFields
= false
, there are validation problems for
imported student and course documents. (There are no validation problems for imported teacher
documents.)
Example 21-34 VALIDATE_IMPORT_REPORT for useFlexFields = false Case
There are no validation problems for imported teacher documents.
For imported student data, the problematic document with age
having a string value is reported.
SELECT * FROM DBMS_JSON_DUALITY.validate_import_report(
table_name => 'STUDENT_TAB',
view_name => 'STUDENT');
DATA
----
{"studentId":9,"name":"Luis F.","age":"Nineteen","advisorId":101,"courses":[{"co
urseNumber":"CS101","name":"Algorithms","avgGrade":75},{"courseNumber":"MATH102"
,"name":"Calculus","avgGrade":95},{"courseNumber":"MATH103","name":"Advanced Alg
ebra","avgGrade":82}],"dormitory":{"dormId":201,"dormName":"ABC"}}
ERRORS
------
[{"op":"replace","path":"/age","value":null}]
PL/SQL function validate_import_report
compares input
documents with documents imported into the duality views, ignoring any additional fields
added by the converter (_id
, _metadata
,
ora$map
*, ora$
*_flex
). It uses the
format of JSON Patch to identify the problematic fields and specify editing
operations you can perform on the input data to resolve the problems (differences).
-
Field
path
specifies the location — the syntax of its value is that of JSON Pointer, not that of a SQL/JSON path expression. In this case, thepath
value/age
targets theage
field at the top level of the document. -
Field
op
specifies the editing operation. For the problematic student document, the operation is to replace the value of its top-level fieldage
with JSONnull
. (That may or may not be the resolution you want.)
The problematic student document fails to import into the student
duality view. However, it is still "supported" by that view. It is present in the
view because importing to views course
and teacher
causes a row to be added to underlying table student_root
for that
document (with student_id
= 9
).
The value of field age
in that document has value (JSON)
null
, however, because there's no field in the other two
document sets that maps to column student_root.age
, so that the
value of that column is SQL NULL
. And that NULL
column value maps to JSON null
in the student documents.
For imported course data, the problematic document containing field
Notes
is reported.
SELECT * FROM DBMS_JSON_DUALITY.validate_import_report(
table_name => 'COURSE_TAB',
view_name => 'COURSE');
DATA
----
{"courseId":"MATH101","name":"Algebra","creditHours":3,"students":[{"studentId": [{"op":"remove","path":"/Notes"},{"op":"remove","path":"/creditHours"}]
1,"name":"Donald P."},{"studentId":5,"name":"Hye E."}],"teacher":{"teacherId":10
1,"name":"Abdul J."},"Notes":"Prerequisite for Advanced Algebra"}
ERRORS
------
[{"op":"remove","path":"/Notes"},{"op":"remove","path":"/creditHours"}]
The problematic course document fails to import into the course
duality view.
For that document there are two error operations reported: remove its
top-level fields Notes
and creditHours
. (This may
or may not be the resolution you want.)
Import of the problematic course document fails because of its field
Notes
, which was pruned because, as an occurrence outlier it
wasn't mapped to any column. And as an unmapped field the importer can't store it in
a flex column because there are no flex columns (the input data was converted with
useFlexFields
= false
).
But the course
view's underlying table course_root
anyway gets a row that corresponds to that problematic document (where field
courseId
has value MATH101
), because of
importing the student and teacher data, that is, populating the
student
and teacher
views. Importing to those
views populates columns course_id
and name
of
table course_root
, which are used by student and teacher documents.
It does not, however, populate field Notes
or
creditHours
.
The examples that follow, "Student Duality View Document Collection (useFlexFields = False)" and "Course Duality View Document Collection (useFlexFields = false) ", show the student and course document collections supported by the duality views, that is, the result of importing into those views, respectively.
The teacher duality-view collection is the same as for conversion with
useFlexFields
= true
— see the example "Teacher Duality
View Document Collection (useFlexFields = true)" in Import After Default Conversion.
Example 21-35 Student Duality View Document Collection (useFlexFields = false)
Compare this with the input student document set, "Student Document
Set (Migrator Input)" in School Administration Example, Migrator Input Documents, which
(with conversion using minFieldFrequency
= 25
and
minTypeFrequency
= 15
) has only one outlier field:
age
(with a type-occurrence frequency of 10%).
These are the only differences (ignoring field order, which is irrelevant):
-
Document identifier field
_id
and document-state field_metadata
have been added. (Every document supported by a duality view has these fields.) -
Fields
ora$mapCourseId
andora$mapStudentId
have been added. These correspond to the identifying columns (primary-key columns in this case) for underlying mapping tablemap_table_course_root_to_student_root
. Their values are the same as the values of fieldscourseNumber
andstudentId
, respectively. -
Even though the document for student Luis F. (
studentId
=9
) failed import into thestudent
duality view (because fieldage
has the string value"Nineteen"
, and its 10% occurrence is a type-occurrence outlier), that document is nevertheless present in the duality view. When we import documents into thecourse
andteacher
duality views, a row is added to tablestudent_root
that has9
as the value for columnstudent_root.student_id
, becausestudentId
with value9
is present in both input tablescourse_tab
andteacher_tab
.The
age
field value for that student document for Luis F. is (JSON)null
, however (not"Nineteen"
and not19
). Noage
field exists in either of the course or teacher input document sets, so importing their student data for Luis F. into thecourse
andteacher
views stores SQLNULL
in theage
column in tablestudent_root
. And thatNULL
column value maps to JSONnull
in the student documents.
There are no other differences. In particular, mixed-type field
avgGrade
is unchanged from the input data, as it is not an
outlier: each of its types occurs in more than 15% of the documents.
{
"_id" : 1,
"_metadata" :
{
"etag" : "4F39C8B86F4295AD2958B18A77B0AACC",
"asof" : "00000000004DB839"
},
"age" : 20,
"name" : "Donald P.",
"courses" :
[
{
"ora$mapCourseId" : "CS101",
"ora$mapStudentId" : 1,
"name" : "Algorithms",
"avgGrade" : 75,
"courseNumber" : "CS101"
},
{
"ora$mapCourseId" : "CS102",
"ora$mapStudentId" : 1,
"name" : "Data Structures",
"avgGrade" : "TBD",
"courseNumber" : "CS102"
},
{
"ora$mapCourseId" : "MATH101",
"ora$mapStudentId" : 1,
"name" : "Algebra",
"avgGrade" : 90,
"courseNumber" : "MATH101"
}
],
"advisorId" : 102,
"dormitory" :
{
"dormId" : 201,
"dormName" : "ABC"
},
"studentId" : 1
}
{
"_id" : 2,
"_metadata" :
{
"etag" : "758A4F3E6EF3152A4FA0892AB38635D4",
"asof" : "00000000004DB839"
},
"age" : 21,
"name" : "Elena H.",
"courses" :
[
{
"ora$mapCourseId" : "CS101",
"ora$mapStudentId" : 2,
"name" : "Algorithms",
"avgGrade" : 75,
"courseNumber" : "CS101"
},
{
"ora$mapCourseId" : "CS102",
"ora$mapStudentId" : 2,
"name" : "Data Structures",
"avgGrade" : "TBD",
"courseNumber" : "CS102"
},
{
"ora$mapCourseId" : "MATH102",
"ora$mapStudentId" : 2,
"name" : "Calculus",
"avgGrade" : 95,
"courseNumber" : "MATH102"
}
],
"advisorId" : 103,
"dormitory" :
{
"dormId" : 202,
"dormName" : "XYZ"
},
"studentId" : 2
}
{
"_id" : 3,
"_metadata" :
{
"etag" : "06905F120EF74124C5985354BBCE5CC1",
"asof" : "00000000004DB839"
},
"age" : 20,
"name" : "Francis K.",
"courses" :
[
{
"ora$mapCourseId" : "MATH103",
"ora$mapStudentId" : 3,
"name" : "Advanced Algebra",
"avgGrade" : 82,
"courseNumber" : "MATH103"
}
],
"advisorId" : 103,
"dormitory" :
{
"dormId" : 204,
"dormName" : "QWE"
},
"studentId" : 3
}
{
"_id" : 4,
"_metadata" :
{
"etag" : "50847D1AB63537118A6133A4CC1B8708",
"asof" : "00000000004DB839"
},
"age" : 19,
"name" : "Georgia D.",
"courses" :
[
{
"ora$mapCourseId" : "CS101",
"ora$mapStudentId" : 4,
"name" : "Algorithms",
"avgGrade" : 75,
"courseNumber" : "CS101"
},
{
"ora$mapCourseId" : "MATH102",
"ora$mapStudentId" : 4,
"name" : "Calculus",
"avgGrade" : 95,
"courseNumber" : "MATH102"
},
{
"ora$mapCourseId" : "MATH103",
"ora$mapStudentId" : 4,
"name" : "Advanced Algebra",
"avgGrade" : 82,
"courseNumber" : "MATH103"
}
],
"advisorId" : 101,
"dormitory" :
{
"dormId" : 203,
"dormName" : "LMN"
},
"studentId" : 4
}
{
"_id" : 5,
"_metadata" :
{
"etag" : "FD6E27A868C56D1EF9C7AEB3F08C7F9B",
"asof" : "00000000004DB839"
},
"age" : 21,
"name" : "Hye E.",
"courses" :
[
{
"ora$mapCourseId" : "CS102",
"ora$mapStudentId" : 5,
"name" : "Data Structures",
"avgGrade" : "TBD",
"courseNumber" : "CS102"
},
{
"ora$mapCourseId" : "MATH101",
"ora$mapStudentId" : 5,
"name" : "Algebra",
"avgGrade" : 90,
"courseNumber" : "MATH101"
}
],
"advisorId" : 103,
"dormitory" :
{
"dormId" : 201,
"dormName" : "ABC"
},
"studentId" : 5
}
{
"_id" : 6,
"_metadata" :
{
"etag" : "2BDA7862330B0687F22F830F3E314E34",
"asof" : "00000000004DB839"
},
"age" : 21,
"name" : "Ileana D.",
"courses" :
[
{
"ora$mapCourseId" : "MATH103",
"ora$mapStudentId" : 6,
"name" : "Advanced Algebra",
"avgGrade" : 82,
"courseNumber" : "MATH103"
}
],
"advisorId" : 102,
"dormitory" :
{
"dormId" : 205,
"dormName" : "GHI"
},
"studentId" : 6
}
{
"_id" : 7,
"_metadata" :
{
"etag" : "F1EF0CCD54EDFA78D2263D7E742D6CE8",
"asof" : "00000000004DB839"
},
"age" : 20,
"name" : "Jatin S.",
"courses" :
[
{
"ora$mapCourseId" : "CS101",
"ora$mapStudentId" : 7,
"name" : "Algorithms",
"avgGrade" : 75,
"courseNumber" : "CS101"
},
{
"ora$mapCourseId" : "CS102",
"ora$mapStudentId" : 7,
"name" : "Data Structures",
"avgGrade" : "TBD",
"courseNumber" : "CS102"
}
],
"advisorId" : 101,
"dormitory" :
{
"dormId" : 204,
"dormName" : "QWE"
},
"studentId" : 7
}
{
"_id" : 8,
"_metadata" :
{
"etag" : "9A25A267BC08858E0F754E0C00B32F9E",
"asof" : "00000000004DB839"
},
"age" : 21,
"name" : "Katie H.",
"courses" :
[
{
"ora$mapCourseId" : "CS102",
"ora$mapStudentId" : 8,
"name" : "Data Structures",
"avgGrade" : "TBD",
"courseNumber" : "CS102"
},
{
"ora$mapCourseId" : "MATH103",
"ora$mapStudentId" : 8,
"name" : "Advanced Algebra",
"avgGrade" : 82,
"courseNumber" : "MATH103"
}
],
"advisorId" : 102,
"dormitory" :
{
"dormId" : 205,
"dormName" : "GHI"
},
"studentId" : 8
}
{
"_id" : 10,
"_metadata" :
{
"etag" : "94376DA05B92E47718AF70A31FBE56E7",
"asof" : "00000000004DB839"
},
"age" : 20,
"name" : "Ming L.",
"courses" :
[
{
"ora$mapCourseId" : "MATH102",
"ora$mapStudentId" : 10,
"name" : "Calculus",
"avgGrade" : 95,
"courseNumber" : "MATH102"
}
],
"advisorId" : 101,
"dormitory" :
{
"dormId" : 202,
"dormName" : "XYZ"
},
"studentId" : 10
}
{
"_id" : 9,
"_metadata" :
{
"etag" : "579824C71904C46901BBA605E8539943",
"asof" : "00000000004DB839"
},
"age" : null,
"name" : "Luis F.",
"courses" :
[
{
"ora$mapCourseId" : "CS101",
"ora$mapStudentId" : 9,
"name" : "Algorithms",
"avgGrade" : 75,
"courseNumber" : "CS101"
},
{
"ora$mapCourseId" : "MATH102",
"ora$mapStudentId" : 9,
"name" : "Calculus",
"avgGrade" : 95,
"courseNumber" : "MATH102"
},
{
"ora$mapCourseId" : "MATH103",
"ora$mapStudentId" : 9,
"name" : "Advanced Algebra",
"avgGrade" : 82,
"courseNumber" : "MATH103"
}
],
"advisorId" : 101,
"dormitory" :
{
"dormId" : 201,
"dormName" : "ABC"
},
"studentId" : 9
}
Example 21-36 Course Duality View Document Collection (useFlexFields = false)
Compare this with the input course document set in the example "Course
Document Set (Migrator Input)" in School Administration Example, Migrator Input Documents, which
(with conversion using minFieldFrequency
= 25
and
minTypeFrequency
= 15
) has only one outlier field:
Notes
(with an occurrence frequency of 20%).
These are the only differences (ignoring field order, which is irrelevant):
-
Document identifier field
_id
and document-state field_metadata
have been added. (Every document supported by a duality view has these fields.) -
Fields
ora$mapCourseId
andora$mapStudentId
have been added. These correspond to the identifying columns (primary-key columns in this case) for underlying mapping tablemap_table_course_root_to_student_root
. Their values are the same as the values of fieldscourseNumber
andstudentId
, respectively. -
Even though the document with
courseId
="MATH101"
) failed import into thecourse
duality view (because fieldNotes
occurs in only 20% of the documents and is thus an occurrence outlier), that document is present in the duality view, but without fieldNotes
(it was not mapped to any column by the converter, and there is no flex column in which to store its value becauseuseFlexFields
wasfalse
) and without fieldcreditHours
.The problematic document is supported by the view, because when we import documents into the
student
andteacher
duality views, a row is added to tablecourse_root
that has"MATH101"
as the value for columncourse_root.course_id
. This is because columncourse_id
with value"MATH101"
is present in both input tablesstudent_tab
andteacher_tab
.Because the course document with field
Notes
failed to import, that input document's fieldcreditHours
is also missing from the document supported by the view. FieldcreditHours
isn't provided for that document by importing any documents into thestudent
orteacher
view. Only tablecourse_tab
contains columncredit_hours
.
{
"_id" : "CS101",
"_metadata" :
{
"etag" : "7600B24570B58297702B95B8DE4F1B00",
"asof" : "00000000004DB847"
},
"name" : "Algorithms",
"teacher" :
{
"name" : "Betty Z.",
"teacherId" : 102
},
"students" :
[
{
"ora$mapCourseId" : "CS101",
"ora$mapStudentId" : 1,
"name" : "Donald P.",
"studentId" : 1
},
{
"ora$mapCourseId" : "CS101",
"ora$mapStudentId" : 2,
"name" : "Elena H.",
"studentId" : 2
},
{
"ora$mapCourseId" : "CS101",
"ora$mapStudentId" : 4,
"name" : "Georgia D.",
"studentId" : 4
},
{
"ora$mapCourseId" : "CS101",
"ora$mapStudentId" : 7,
"name" : "Jatin S.",
"studentId" : 7
},
{
"ora$mapCourseId" : "CS101",
"ora$mapStudentId" : 9,
"name" : "Luis F.",
"studentId" : 9
}
],
"creditHours" : 5,
"courseId" : "CS101"
}
{
"_id" : "CS102",
"_metadata" :
{
"etag" : "C3813410219036CF0E210FFCE3917FEB",
"asof" : "00000000004DB847"
},
"name" : "Data Structures",
"teacher" :
{
"name" : "Betty Z.",
"teacherId" : 102
},
"students" :
[
{
"ora$mapCourseId" : "CS102",
"ora$mapStudentId" : 1,
"name" : "Donald P.",
"studentId" : 1
},
{
"ora$mapCourseId" : "CS102",
"ora$mapStudentId" : 2,
"name" : "Elena H.",
"studentId" : 2
},
{
"ora$mapCourseId" : "CS102",
"ora$mapStudentId" : 5,
"name" : "Hye E.",
"studentId" : 5
},
{
"ora$mapCourseId" : "CS102",
"ora$mapStudentId" : 7,
"name" : "Jatin S.",
"studentId" : 7
},
{
"ora$mapCourseId" : "CS102",
"ora$mapStudentId" : 8,
"name" : "Katie H.",
"studentId" : 8
}
],
"creditHours" : 3,
"courseId" : "CS102"
}
{
"_id" : "MATH101",
"_metadata" :
{
"etag" : "5E24FBF3B13A297A89FE1D4C68C705BE",
"asof" : "00000000004DB847"
},
"name" : "Algebra",
"teacher" :
{
"name" : "Abdul J.",
"teacherId" : 101
},
"students" :
[
{
"ora$mapCourseId" : "MATH101",
"ora$mapStudentId" : 1,
"name" : "Donald P.",
"studentId" : 1
},
{
"ora$mapCourseId" : "MATH101",
"ora$mapStudentId" : 5,
"name" : "Hye E.",
"studentId" : 5
}
],
"courseId" : "MATH101"
}
{
"_id" : "MATH102",
"_metadata" :
{
"etag" : "4B55E2EF38E6DDAF6777251168DD07A5",
"asof" : "00000000004DB847"
},
"name" : "Calculus",
"teacher" :
{
"name" : "Abdul J.",
"teacherId" : 101
},
"students" :
[
{
"ora$mapCourseId" : "MATH102",
"ora$mapStudentId" : 2,
"name" : "Elena H.",
"studentId" : 2
},
{
"ora$mapCourseId" : "MATH102",
"ora$mapStudentId" : 4,
"name" : "Georgia D.",
"studentId" : 4
},
{
"ora$mapCourseId" : "MATH102",
"ora$mapStudentId" : 9,
"name" : "Luis F.",
"studentId" : 9
},
{
"ora$mapCourseId" : "MATH102",
"ora$mapStudentId" : 10,
"name" : "Ming L.",
"studentId" : 10
}
],
"creditHours" : 4,
"courseId" : "MATH102"
}
{
"_id" : "MATH103",
"_metadata" :
{
"etag" : "C59E6274FE813279ECC28C73CA4AB121",
"asof" : "00000000004DB847"
},
"name" : "Advanced Algebra",
"teacher" :
{
"name" : "Colin J.",
"teacherId" : 103
},
"students" :
[
{
"ora$mapCourseId" : "MATH103",
"ora$mapStudentId" : 3,
"name" : "Francis K.",
"studentId" : 3
},
{
"ora$mapCourseId" : "MATH103",
"ora$mapStudentId" : 4,
"name" : "Georgia D.",
"studentId" : 4
},
{
"ora$mapCourseId" : "MATH103",
"ora$mapStudentId" : 6,
"name" : "Ileana D.",
"studentId" : 6
},
{
"ora$mapCourseId" : "MATH103",
"ora$mapStudentId" : 8,
"name" : "Katie H.",
"studentId" : 8
},
{
"ora$mapCourseId" : "MATH103",
"ora$mapStudentId" : 9,
"name" : "Luis F.",
"studentId" : 9
}
],
"creditHours" : "3",
"courseId" : "MATH103"
}
Creating data-guide JSON schemas for the duality views is identical to doing so
for the useFlexFields
= true
case. — see the example
"Create JSON Data Guides for Document Collections Supported by Duality Views", "" in
Import After Default Conversion. And the resulting data guides for
the student
and teacher
views are the same as for that case
— see "Student Duality View Data Guide" and "Teacher Duality View Data Guide"in
Import After Default Conversion.
But the data guide created for the course
view is not the same:
Example 21-37 Course Duality View Data Guide, for useFlexFields = false Case
This data guide JSON schema summarizes the collection of course documents
supported by duality view course
, for the conversion case where
useFlexFields
is false
. It is identical to the data
guide for the conversion case where useFlexFields
is true
,
except that it is missing the Notes
field.
{
"type" : "object",
"o:frequency" : 100,
"o:last_analyzed" : "2025-01-15T21:19:03",
"o:sample_size" : 5,
"required" : true,
"properties" :
{
"_id" :
{
"type" : "string",
"o:length" : 8,
"o:preferred_column_name" : "_id",
"o:frequency" : 100,
"o:low_value" : "CS101",
"o:high_value" : "MATH103",
"o:num_nulls" : 0,
"o:last_analyzed" : "2025-01-15T21:19:03",
"o:sample_size" : 5,
"required" : true,
"maxLength" : 7,
"minLength" : 5
},
"name" :
{
"type" : "string",
"o:length" : 16,
"o:preferred_column_name" : "name",
"o:frequency" : 100,
"o:low_value" : "Advanced Algebra",
"o:high_value" : "Data Structures",
"o:num_nulls" : 0,
"o:last_analyzed" : "2025-01-15T21:19:03",
"o:sample_size" : 5,
"required" : true,
"maxLength" : 16,
"minLength" : 7
},
"teacher" :
{
"type" : "object",
"o:preferred_column_name" : "teacher",
"o:frequency" : 100,
"o:last_analyzed" : "2025-01-15T21:19:03",
"o:sample_size" : 5,
"required" : true,
"properties" :
{
"name" :
{
"type" : "string",
"o:length" : 8,
"o:preferred_column_name" : "name",
"o:frequency" : 100,
"o:low_value" : "Abdul J.",
"o:high_value" : "Colin J.",
"o:num_nulls" : 0,
"o:last_analyzed" : "2025-01-15T21:19:03",
"o:sample_size" : 5,
"required" : true,
"maxLength" : 8,
"minLength" : 8
},
"teacherId" :
{
"type" : "number",
"o:preferred_column_name" : "teacherId",
"o:frequency" : 100,
"o:low_value" : 101,
"o:high_value" : 103,
"o:num_nulls" : 0,
"o:last_analyzed" : "2025-01-15T21:19:03",
"o:sample_size" : 5,
"required" : true,
"maximum" : 103,
"minimum" : 101
}
}
},
"courseId" :
{
"type" : "string",
"o:length" : 8,
"o:preferred_column_name" : "courseId",
"o:frequency" : 100,
"o:low_value" : "CS101",
"o:high_value" : "MATH103",
"o:num_nulls" : 0,
"o:last_analyzed" : "2025-01-15T21:19:03",
"o:sample_size" : 5,
"required" : true,
"maxLength" : 7,
"minLength" : 5
},
"students" :
{
"type" : "array",
"o:preferred_column_name" : "students",
"o:frequency" : 100,
"o:last_analyzed" : "2025-01-15T21:19:03",
"o:sample_size" : 5,
"required" : true,
"items" :
{
"properties" :
{
"name" :
{
"type" : "string",
"o:length" : 16,
"o:preferred_column_name" : "name",
"o:frequency" : 100,
"o:low_value" : "Donald P.",
"o:high_value" : "Ming L.",
"o:num_nulls" : 0,
"o:last_analyzed" : "2025-01-15T21:19:03",
"o:sample_size" : 5,
"required" : true,
"maxLength" : 10,
"minLength" : 6
},
"studentId" :
{
"type" : "number",
"o:preferred_column_name" : "studentId",
"o:frequency" : 100,
"o:low_value" : 1,
"o:high_value" : 10,
"o:num_nulls" : 0,
"o:last_analyzed" : "2025-01-15T21:19:03",
"o:sample_size" : 5,
"required" : true,
"maximum" : 10,
"minimum" : 1
},
"ora$mapCourseId" :
{
"type" : "string",
"o:length" : 8,
"o:preferred_column_name" : "ora$mapCourseId",
"o:frequency" : 100,
"o:low_value" : "CS101",
"o:high_value" : "MATH103",
"o:num_nulls" : 0,
"o:last_analyzed" : "2025-01-15T21:19:03",
"o:sample_size" : 5,
"required" : true,
"maxLength" : 7,
"minLength" : 5
},
"ora$mapStudentId" :
{
"type" : "number",
"o:preferred_column_name" : "ora$mapStudentId",
"o:frequency" : 100,
"o:low_value" : 1,
"o:high_value" : 10,
"o:num_nulls" : 0,
"o:last_analyzed" : "2025-01-15T21:19:03",
"o:sample_size" : 5,
"required" : true,
"maximum" : 10,
"minimum" : 1
}
}
}
},
"_metadata" :
{
"type" : "object",
"o:preferred_column_name" : "_metadata",
"o:frequency" : 100,
"o:last_analyzed" : "2025-01-15T21:19:03",
"o:sample_size" : 5,
"required" : true,
"properties" :
{
"asof" :
{
"type" : "binary",
"o:length" : 8,
"o:preferred_column_name" : "asof",
"o:frequency" : 100,
"o:low_value" : "",
"o:high_value" : "",
"o:num_nulls" : 0,
"o:last_analyzed" : "2025-01-15T21:19:03",
"o:sample_size" : 5,
"required" : true
},
"etag" :
{
"type" : "binary",
"o:length" : 16,
"o:preferred_column_name" : "etag",
"o:frequency" : 100,
"o:low_value" : "",
"o:high_value" : "",
"o:num_nulls" : 0,
"o:last_analyzed" : "2025-01-15T21:19:03",
"o:sample_size" : 5,
"required" : true
}
}
},
"creditHours" :
{
"oneOf" :
[
{
"type" : "number",
"o:preferred_column_name" : "creditHours",
"o:frequency" : 60,
"o:low_value" : 3,
"o:high_value" : 5,
"o:num_nulls" : 0,
"o:last_analyzed" : "2025-01-15T21:19:03",
"o:sample_size" : 5,
"maximum" : 5,
"minimum" : 3
},
{
"type" : "string",
"o:length" : 1,
"o:preferred_column_name" : "creditHours",
"o:frequency" : 20,
"o:low_value" : "3",
"o:high_value" : "3",
"o:num_nulls" : 0,
"o:last_analyzed" : "2025-01-15T21:19:03",
"o:sample_size" : 5,
"maxLength" : 1,
"minLength" : 1
}
]
}
}
}
This is the missing Notes
entry (from the useFlexFields
=
true
case):
"Notes" : {"type" : "string",
"o:length" : 64,
"o:preferred_column_name" : "Notes",
"o:frequency" : 20,
"o:low_value" : "Prerequisite for Advanced Algebra",
"o:high_value" : "Prerequisite for Advanced Algebra",
"o:num_nulls" : 0,
"o:last_analyzed" : "2025-01-15T21:11:48",
"o:sample_size" : 5,
"maxLength" : 33,
"minLength" : 33}
See Also:
-
DBMS_JSON_DUALITY IN Oracle Database PL/SQL Packages and Types Reference for information about function
validate_import_report
-
JSON Patch and JSON Pointer for information about the error content reported by
DBMS_JSON_DUALITY.validate_import_report
Parent topic: Migrating From JSON To Duality