materialized_tables
Creates, updates, deletes, gets or lists a materialized_tables resource.
Overview
| Name | materialized_tables |
| Type | Resource |
| Id | confluent.sql.materialized_tables |
Fields
The following fields are returned by SELECT queries:
- get_sqlv1_materialized_table
- list_sqlv1_materialized_tables
The requested Materialized Table.
| Name | Datatype | Description |
|---|---|---|
name | string | The user-provided name of the resource, unique within this environment. (pattern: ^[a-zA-Z0-9]([a-zA-Z0-9_-]*[a-zA-Z0-9])?$, example: high-value-orders) |
environment_id | string | The unique identifier for the environment. |
organization_id | string (uuid) | The unique identifier for the organization. |
api_version | string | APIVersion defines the schema version of this representation of a resource. (sql/v1) (example: sql/v1) |
kind | string | Kind defines the object this REST resource represents. (MaterializedTable) |
metadata | object | ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. |
spec | object | The specifications of the Materialized Table. |
status | object | The status of the Materialized Table. |
A list of Materialized Tables.
| Name | Datatype | Description |
|---|---|---|
name | string | The user-provided name of the resource, unique within this environment. (pattern: ^[a-zA-Z0-9]([a-zA-Z0-9_-]*[a-zA-Z0-9])?$, example: high-value-orders) |
environment_id | string | The unique identifier for the environment. |
organization_id | string (uuid) | The unique identifier for the organization. |
api_version | string | APIVersion defines the schema version of this representation of a resource. (sql/v1) (example: sql/v1) |
kind | string | Kind defines the object this REST resource represents. (MaterializedTable) |
metadata | object | ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. |
spec | object | The specifications of the Materialized Table. |
status | object | The status of the Materialized Table. |
Methods
The following methods are available for this resource:
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
environment_id | string | The unique identifier for the environment. |
kafka_cluster_id | string | The unique identifier for the database. |
organization_id | string (uuid) | The unique identifier for the organization |
table_name | string | The unique identifier for the Materialized Table |
page_size | integer (int32) | A pagination size for collection requests. |
page_token | string | An opaque pagination token for collection requests. |
SELECT examples
- get_sqlv1_materialized_table
- list_sqlv1_materialized_tables
Retrieve a specific Materialized Table by name.
SELECT
name,
environment_id,
organization_id,
api_version,
kind,
metadata,
spec,
status
FROM confluent.sql.materialized_tables
WHERE organization_id = '{{ organization_id }}' -- required
AND environment_id = '{{ environment_id }}' -- required
AND kafka_cluster_id = '{{ kafka_cluster_id }}' -- required
AND table_name = '{{ table_name }}' -- required
;
Retrieve a sorted and paginated list of all materialized tables.
SELECT
name,
environment_id,
organization_id,
api_version,
kind,
metadata,
spec,
status
FROM confluent.sql.materialized_tables
WHERE organization_id = '{{ organization_id }}' -- required
AND environment_id = '{{ environment_id }}' -- required
AND page_size = '{{ page_size }}'
AND page_token = '{{ page_token }}'
;
INSERT examples
- create_sqlv1_materialized_table
- Manifest
Create a new Materialized Table.
INSERT INTO confluent.sql.materialized_tables (
name,
spec,
organization_id,
environment_id,
kafka_cluster_id
)
SELECT
'{{ name }}' /* required */,
'{{ spec }}' /* required */,
'{{ organization_id }}',
'{{ environment_id }}',
'{{ kafka_cluster_id }}'
RETURNING
name,
environment_id,
organization_id,
api_version,
kind,
metadata,
spec,
status
;
# Description fields are for documentation purposes
- name: materialized_tables
props:
- name: organization_id
value: "{{ organization_id }}"
description: Required parameter for the materialized_tables resource.
- name: environment_id
value: "{{ environment_id }}"
description: Required parameter for the materialized_tables resource.
- name: kafka_cluster_id
value: "{{ kafka_cluster_id }}"
description: Required parameter for the materialized_tables resource.
- name: name
value: "{{ name }}"
description: |
The user-provided name of the resource, unique within this environment.
- name: spec
description: |
The specifications of the Materialized Table.
value:
kafka_cluster_id: "{{ kafka_cluster_id }}"
compute_pool_id: "{{ compute_pool_id }}"
principal: "{{ principal }}"
stopped: {{ stopped }}
table_options: "{{ table_options }}"
session_options: "{{ session_options }}"
columns:
- name: "{{ name }}"
type:
type: "{{ type }}"
nullable: {{ nullable }}
length: {{ length }}
precision: {{ precision }}
scale: {{ scale }}
key_type:
type: "{{ type }}"
nullable: {{ nullable }}
length: {{ length }}
precision: {{ precision }}
scale: {{ scale }}
key_type: "{{ key_type }}"
value_type: "{{ value_type }}"
element_type: "{{ element_type }}"
fields:
- name: "{{ name }}"
field_type:
type: "{{ type }}"
nullable: {{ nullable }}
length: {{ length }}
precision: {{ precision }}
scale: {{ scale }}
key_type: "{{ key_type }}"
value_type: "{{ value_type }}"
element_type: "{{ element_type }}"
fields: "{{ fields }}"
resolution: "{{ resolution }}"
fractional_precision: {{ fractional_precision }}
class_name: "{{ class_name }}"
description: "{{ description }}"
resolution: "{{ resolution }}"
fractional_precision: {{ fractional_precision }}
class_name: "{{ class_name }}"
value_type:
type: "{{ type }}"
nullable: {{ nullable }}
length: {{ length }}
precision: {{ precision }}
scale: {{ scale }}
key_type:
type: "{{ type }}"
nullable: {{ nullable }}
length: {{ length }}
precision: {{ precision }}
scale: {{ scale }}
key_type: "{{ key_type }}"
value_type: "{{ value_type }}"
element_type: "{{ element_type }}"
fields: "{{ fields }}"
resolution: "{{ resolution }}"
fractional_precision: {{ fractional_precision }}
class_name: "{{ class_name }}"
value_type: "{{ value_type }}"
element_type: "{{ element_type }}"
fields:
- name: "{{ name }}"
field_type:
type: "{{ type }}"
nullable: {{ nullable }}
length: {{ length }}
precision: {{ precision }}
scale: {{ scale }}
key_type: "{{ key_type }}"
value_type: "{{ value_type }}"
element_type: "{{ element_type }}"
fields: "{{ fields }}"
resolution: "{{ resolution }}"
fractional_precision: {{ fractional_precision }}
class_name: "{{ class_name }}"
description: "{{ description }}"
resolution: "{{ resolution }}"
fractional_precision: {{ fractional_precision }}
class_name: "{{ class_name }}"
element_type:
type: "{{ type }}"
nullable: {{ nullable }}
length: {{ length }}
precision: {{ precision }}
scale: {{ scale }}
key_type:
type: "{{ type }}"
nullable: {{ nullable }}
length: {{ length }}
precision: {{ precision }}
scale: {{ scale }}
key_type: "{{ key_type }}"
value_type: "{{ value_type }}"
element_type: "{{ element_type }}"
fields: "{{ fields }}"
resolution: "{{ resolution }}"
fractional_precision: {{ fractional_precision }}
class_name: "{{ class_name }}"
value_type:
type: "{{ type }}"
nullable: {{ nullable }}
length: {{ length }}
precision: {{ precision }}
scale: {{ scale }}
key_type: "{{ key_type }}"
value_type: "{{ value_type }}"
element_type: "{{ element_type }}"
fields: "{{ fields }}"
resolution: "{{ resolution }}"
fractional_precision: {{ fractional_precision }}
class_name: "{{ class_name }}"
element_type: "{{ element_type }}"
fields:
- name: "{{ name }}"
field_type:
type: "{{ type }}"
nullable: {{ nullable }}
length: {{ length }}
precision: {{ precision }}
scale: {{ scale }}
key_type: "{{ key_type }}"
value_type: "{{ value_type }}"
element_type: "{{ element_type }}"
fields: "{{ fields }}"
resolution: "{{ resolution }}"
fractional_precision: {{ fractional_precision }}
class_name: "{{ class_name }}"
description: "{{ description }}"
resolution: "{{ resolution }}"
fractional_precision: {{ fractional_precision }}
class_name: "{{ class_name }}"
fields:
- name: "{{ name }}"
field_type:
type: "{{ type }}"
nullable: {{ nullable }}
length: {{ length }}
precision: {{ precision }}
scale: {{ scale }}
key_type: "{{ key_type }}"
value_type: "{{ value_type }}"
element_type: "{{ element_type }}"
fields: "{{ fields }}"
resolution: "{{ resolution }}"
fractional_precision: {{ fractional_precision }}
class_name: "{{ class_name }}"
description: "{{ description }}"
resolution: "{{ resolution }}"
fractional_precision: {{ fractional_precision }}
class_name: "{{ class_name }}"
comment: "{{ comment }}"
kind: "{{ kind }}"
metadata_key: "{{ metadata_key }}"
virtual: {{ virtual }}
expression: "{{ expression }}"
watermark:
column: "{{ column }}"
expression: "{{ expression }}"
constraints:
- name: "{{ name }}"
type: "{{ type }}"
columns: "{{ columns }}"
enforced: {{ enforced }}
distribution:
kind: "{{ kind }}"
keys:
- "{{ keys }}"
bucket_count: {{ bucket_count }}
query: "{{ query }}"
REPLACE examples
- update_sqlv1_materialized_table
Make a request to update a Materialized Table's mutable fields.
Mutable fields include: query, stopped, compute_pool_id, principal, columns, watermark, constraints and table_options.
REPLACE confluent.sql.materialized_tables
SET
name = '{{ name }}',
spec = '{{ spec }}'
WHERE
organization_id = '{{ organization_id }}' --required
AND environment_id = '{{ environment_id }}' --required
AND kafka_cluster_id = '{{ kafka_cluster_id }}' --required
AND table_name = '{{ table_name }}' --required
AND name = '{{ name }}' --required
AND spec = '{{ spec }}' --required
RETURNING
name,
environment_id,
organization_id,
api_version,
kind,
metadata,
spec,
status;
DELETE examples
- delete_sqlv1_materialized_table
Delete a specific Materialized Table by name.
DELETE FROM confluent.sql.materialized_tables
WHERE organization_id = '{{ organization_id }}' --required
AND environment_id = '{{ environment_id }}' --required
AND kafka_cluster_id = '{{ kafka_cluster_id }}' --required
AND table_name = '{{ table_name }}' --required
;