2.9.1 About Oracle SQL Access to Kafka

Oracle SQL access to Kafka (OSaK) is a PL/SQL package that enables Oracle SQL to query Apache Kafka topics via database views and underlying external tables. Apache Kafka versions 0.10.2 and higher are supported.

The ORA_KAFKA PL/SQL package has functions and procedures to register a Kafka cluster in a database schema, create views to query Kafka topics (using external tables under the covers), query data from specified offsets or specified timestamps, and more. Kafka data does not have to be persisted in the Oracle Database. OSaK also allows Kafka data to be loaded into tables stored in the Oracle Database.

Kafka topics in JSON and CSV (delimited text) format are supported, along with offset management to ensure Kafka messages are not queried twice, and Kafka messages are not missed. OSaK is the ideal option for querying the most recent Kafka messages (for example, messages from 5 seconds ago till current time), or a sequence of messages starting from a specific offset or timestamp (for example a 1000 messages starting from timestamp t or offset o).

To get started with OSaK, see Get Started with Oracle SQL Access to Kafka.

For complete reference information for the ORA_KAFKA package, refer to the documentation within the package specification which can be found in the sql/orakafkas.sql file in the unzipped OSaK kit location.