Manage statement life cycle with the Confluent CLI¶
Manage Flink SQL statements in Confluent Cloud for Apache Flink®️ by using the
confluent flink statement
commands in the Confluent CLI. To see the available commands, use the
--help
option.
confluent flink statement --help
Important
Confluent Cloud for Apache Flink®️ is currently available for Preview. A Preview feature is a Confluent Cloud component that is being introduced to gain early feedback from developers. Preview features can be used for evaluation and non-production testing purposes or to provide feedback to Confluent. The warranty, SLA, and Support Services provisions of your agreement with Confluent do not apply to Preview features. Confluent may discontinue providing Preview releases of the Preview features at any time in Confluent’s sole discretion. Check out Getting Help for questions, feedback and requests.
For Flink SQL features and limitations in the preview program, see Notable Limitations in Public Preview.
List statements¶
Run the confluent flink statement list command to list all of the non-deleted statements in your environment.
confluent flink statement list
Your output should resemble:
Creation Date | Name | Statement | Compute Pool | Status | Status Detail
--------------------------------+----------------------+--------------------------------+--------------+-----------+---------------------------------
2023-07-08 21:04:06 +0000 UTC | 4b1d3494-f0f7-460d-9 | INSERT INTO copytopic | lfcp-r2j1x9 | RUNNING |
| | SELECT symbol,price from | | |
| | topic_datagen; | | |
2023-07-08 21:07:04 +0000 UTC | 6c43b973-b3c6-4be8-9 | INSERT INTO copytopic | lfcp-r2j1x9 | RUNNING |
| | SELECT symbol,price from | | |
| | topic_datagen; | | |
...
To list only the statements that you’ve created, get the context for your
current Confluent Cloud login session and provide the context with the --context
option.
confluent context list
Your output should resemble:
Current | Name | Platform | Credential
----------+--------------------------------------------------------+-----------------+------------------------------------
* | login-<your-email-address>-https://confluent.cloud | confluent.cloud | username-<your-email-address>
Run the
confluent flink statement list
command with the --context
option.
confluent flink statement list --context login-<your-email-address>-https://confluent.cloud
To list only the statements in your compute pool, provide the compute pool ID
with the --compute-pool
option.
confluent flink statement list --compute-pool ${COMPUTE_POOL_ID}
Describe a statement¶
Run the confluent flink statements describe command to view the details of an existing statement.
confluent flink statement describe <statement-name>
Your output should resemble:
Creation Date | Name | Statement | Compute Pool | Status | Status Detail
--------------------------------+--------------------+------------+--------------+-----------+----------------
2023-07-19 19:26:52 +0000 UTC | fdc6cbf5-038a-408c | show jobs; | lfcp-a2b1c9 | COMPLETED |
List exceptions from a statement¶
Run the confluent flink statements exception list command to get exceptions that have been thrown by a statement.
confluent flink statement exception list <statement-name>
Delete a statement¶
Run the confluent flink statement delete command to delete an existing statement permanently.
- All of its resources, like checkpoints, are also deleted.
- Deleting a statement stops charges for its use.
confluent flink statement delete <statement-name>
Your output should resemble:
Deleted Flink SQL statement "ac23db14-b5dc-49fb-b".