Java json

JDBC JSON Analytics Sample

Plain JDBC sample that analyzes nested JSON documents with advanced SQL/JSON operators.

#Java#JSON#Testcontainers
What this sample helps you learn

This sample explores advanced Oracle SQL/JSON operators with plain JDBC. It stores nested order documents and runs analytical queries using `JSON_TABLE`, `JSON_EXISTS`, and `JSON_ARRAYAGG` to produce insights without shredding JSON data into relational tables.

Highlights

  • Use JSON_TABLE to project order line items into a relational rowset directly from JSON documents.
  • Aggregate product demand by combining JSON_TABLE, GROUP BY, and ordering to find the top-selling SKUs.
  • Filter orders using JSON_EXISTS predicates and compact the result into JSON arrays via JSON_ARRAYAGG.
  • Package the workflow as a console program and validate it with a Testcontainers-powered integration test.