Table: oci_streaming_stream - Query OCI Streaming Service Streams using SQL
Oracle Cloud Infrastructure's Streaming Service is a fully managed, scalable, and durable solution for ingesting and consuming high-volume data streams in real time. It allows you to collect, process, and analyze streaming data, such as application logs, telemetry, and other data, in a fault-tolerant way. The service is designed to support streaming use cases, such as analytics, application monitoring, and telemetry, among others.
Table Usage Guide
The oci_streaming_stream
table provides insights into streams within Oracle Cloud Infrastructure's Streaming Service. As a data engineer, explore stream-specific details through this table, including partitions, retention periods, and associated metadata. Utilize it to uncover information about streams, such as those with long retention periods, the partition distribution within streams, and the verification of stream properties.
Examples
Basic info
Explore which streams in your Oracle Cloud Infrastructure are active and when they were created. This can help you manage and track your resources effectively.
select name, id, lifecycle_state, time_createdfrom oci_streaming_stream;
select name, id, lifecycle_state, time_createdfrom oci_streaming_stream;
List streams that are not active
Uncover the details of inactive streams within your environment. This can be useful for identifying potential resource waste or areas for optimization.
select name, id, lifecycle_state, time_createdfrom oci_streaming_streamwhere lifecycle_state <> 'ACTIVE';
select name, id, lifecycle_state, time_createdfrom oci_streaming_streamwhere lifecycle_state <> 'ACTIVE';
List streams with retention period greater than 24 hrs
Discover the segments that have a retention period longer than a day. This is useful for identifying and managing streams that require a longer data storage period.
select name, id, lifecycle_state, time_created, retention_in_hoursfrom oci_streaming_streamwhere retention_in_hours > 24;
select name, id, lifecycle_state, time_created, retention_in_hoursfrom oci_streaming_streamwhere retention_in_hours > 24;
Schema for oci_streaming_stream
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
compartment_id | text | = | The OCID of the compartment in Tenant in which the resource is located. |
defined_tags | jsonb | Defined tags for resource. Defined tags are set up in your tenancy by an administrator. Only users granted permission to work with the defined tags can apply them to resources. | |
freeform_tags | jsonb | Free-form tags for resource. This tags can be applied by any user with permissions on the resource. | |
id | text | = | The OCID of the stream. |
lifecycle_state | text | = | The current state of the stream. |
lifecycle_state_details | text | Any additional details about the current state of the stream. | |
messages_endpoint | text | The endpoint to use when creating the StreamClient to consume or publish messages in the stream. | |
name | text | = | The name of the stream. |
partitions | bigint | The number of partitions in the stream. | |
region | text | The OCI region in which the resource is located. | |
retention_in_hours | bigint | The retention period of the stream, in hours. This property is read-only. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
stream_pool_id | text | = | The OCID of the stream pool that contains the stream. |
tags | jsonb | A map of tags for the resource. | |
tenant_id | text | =, !=, ~~, ~~*, !~~, !~~* | The OCID of the Tenant in which the resource is located. |
tenant_name | text | The name of the Tenant in which the resource is located. | |
time_created | timestamp with time zone | The date and time the stream was created. | |
title | text | Title of the resource. |
Export
This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- oci
You can pass the configuration to the command with the --config
argument:
steampipe_export_oci --config '<your_config>' oci_streaming_stream