statements
Creates, updates, deletes, gets or lists a statements
resource.
Overview
Name | statements |
Type | Resource |
Id | confluent.sql.statements |
Fields
Name | Datatype | Description |
---|---|---|
name | string | The user provided name of the resource, unique within this environment. |
_spec | object | |
api_version | string | APIVersion defines the schema version of this representation of a resource. |
environment_id | string | The unique identifier for the environment. |
kind | string | Kind defines the object this REST resource represents. |
metadata | `` | The metadata of the statement. |
organization_id | string | The unique identifier for the organization. |
result | object | Statement Result represents a resource used to model results of SQL statements. The API allows you to read your SQL statement result. |
spec | object | The specs of the Statement |
status | object | The status of the Statement |
Methods
SELECT
examples
Retrieve a sorted, filtered, paginated list of all statements.
SELECT
name,
_spec,
api_version,
environment_id,
kind,
metadata,
organization_id,
result,
spec,
status
FROM confluent.sql.statements
WHERE environment_id = '{{ environment_id }}'
AND organization_id = '{{ organization_id }}';
INSERT
example
Use the following StackQL query and manifest file to create a new statements
resource.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO confluent.sql.statements (
data__name,
data__organization_id,
data__environment_id,
data__spec,
data__result,
environment_id,
organization_id
)
SELECT
'{{ name }}',
'{{ organization_id }}',
'{{ environment_id }}',
'{{ spec }}',
'{{ result }}'
;
/*+ create */
INSERT INTO confluent.sql.statements (
data__spec,
data__name,
environment_id,
organization_id
)
SELECT
'{{ spec }}',
'{{ name }}',
'{{ environment_id }}',
'{{ organization_id }}'
;
- name: statements
props:
- name: environment_id
value: string
- name: organization_id
value: string
- name: name
value: string
- name: organization_id
value: string
- name: environment_id
value: string
- name: spec
value: object
- name: result
props:
- name: api_version
value: string
- name: kind
value: string
- name: metadata
props:
- name: self
value: string
- name: next
value: string
- name: results
props:
- name: data
value: array
UPDATE
example
Updates a statements
resource.
/*+ update */
UPDATE confluent.sql.statements
SET
WHERE
environment_id = '{{ environment_id }}'
AND organization_id = '{{ organization_id }}'
AND statement_name = '{{ statement_name }}';
DELETE
example
Deletes the specified statements
resource.
/*+ delete */
DELETE FROM confluent.sql.statements
WHERE environment_id = '{{ environment_id }}'
AND organization_id = '{{ organization_id }}'
AND statement_name = '{{ statement_name }}';