例︓ S3上にあるJSONファイルに対するJSONサーチ・インデックスの作成と検索例 2024/7 Documentation: Use JSON Search on Documents in Object Storage SQL> BEGIN 2 DBMS_CLOUD.CREATE_EXTERNAL_TEXT_INDEX ( 3 credential_name => 'AWS_S3_CRED', 4 location_uri => 'https://s3bucket-course.s3.ap-northeast-1.amazonaws.com', 5 index_name => 'S3_COURSE_DATA_INDEX', 6 format => JSON_OBJECT ('json_index' value 'true') 7 ); 8 END; 9 / PL/SQL procedure successfully completed. -- ⽣徒名にDonaldが含まれているJSONファイルを検索 SQL> SELECT JSON_VALUE (data, '$.name' returning VARCHAR2) AS course_name, object_name, object_path 2 FROM s3_course_data_index WHERE JSON_TEXTCONTAINS(file_line_json, '$.students.name', 'Donald'); COURSE_NAME OBJECT_NAME OBJECT_PATH -------------------- -------------------- -------------------------------------------------------------------------------- Algebra course_data.json https://s3bucket-course.s3.ap-northeast-1.amazonaws.com/ Algorithms course_data.json https://s3bucket-course.s3.ap-northeast-1.amazonaws.com/ Data Structures course_data.json https://s3bucket-course.s3.ap-northeast-1.amazonaws.com/ { "courseId": "MATH101", "name": "Algebra", "creditHours": 3, "students": [ {"studentId":1,"name": "Donald P."}, {"studentId": 5,"name": "Hye E."} ], "teacher": {"teacherId": 101,"name": "Abdul J."}, "Notes": "Prerequisite for Advanced Algebra" } JSONオブジェクトの例 Text Indexing and Search on JSON Files in Object Storage オブジェクト・ストレージにあるJSONファイルのテキスト検索索引