DDL Statements in Confluent Cloud for Apache Flink¶
In Confluent Cloud for Apache Flink®, a statement is a high-level resource that’s created when you enter a SQL query.
Data Definition Language (DDL) statements are imperative verbs that define metadata in Flink SQL by adding, changing, or deleting tables.
Unlike Data Manipulation Language (DML) statements, DDL statements modify only metadata and don’t change data. When you want to change data, use DML statements.
For valid lexical structure of statements, see Flink SQL Syntax in Confluent Cloud for Apache Flink.
Available DDL statements¶
These are the available DDL statements in Confluent Cloud for Flink SQL.
- ALTER
- ALTER TABLE: Change properties of an existing table.
- ALTER MODEL: Rename an AI model or change model options.
- CREATE
- CREATE TABLE: Register a table into the current or specified catalog (Confluent Cloud environment).
- CREATE FUNCTION: Register a user-defined function (UDF) in the current database (Apache Kafka® cluster).
- CREATE MODEL: Create a new AI model.
- DESCRIBE
- DESCRIBE: Show properties of a table, AI model, or UDF.
- DROP
- DROP MODEL: Remove an AI model.
- DROP TABLE: Remove a table.
- DROP VIEW: Remove a view from a catalog.
- EXPLAIN
- EXPLAIN: View the query plan of a Flink SQL statement.
- RESET
- RESET: Reset the Flink SQL shell configuration to default settings.
- SET
- SET: Modify or list the Flink SQL shell configuration.
- SHOW
- SHOW CATALOGS: List all catalogs.
- SHOW CREATE MODEL: Show details about an AI inference model.
- SHOW CREATE TABLE: Show details about a table.
- SHOW CURRENT CATALOG: Show the current catalog.
- SHOW CURRENT DATABASE: Show the current database.
- SHOW DATABASES: List all databases in the current catalog.
- SHOW FUNCTIONS: List all functions in the current catalog and database.
- SHOW JOBS: List the status of all statements in the current catalog.
- SHOW MODELS: List all AI models that are registered in the current catalog.
- SHOW TABLES: List all tables for the current database.
- USE
- USE CATALOG: Set the current catalog.
- USE [database_name]: Set the current database.