In the previous segment, you were introduced to the operators available in the Table API. Now, in this segment, let’s take a look at the functionalities provided by SQL.
Let’s summarise your learnings from this video.
SQL functionalities
The following are the supported statements in Flink SQL:
- CREATE: This statement is used to create a table/view/function to the mentioned or the current Catalog. The created/registered table/view/function can be in SQL queries. The following CREATE statements are supported by Flink:
- CREATE TABLE
- CREATE CATALOG
- CREATE DATABASE
- CREATE VIEW
- CREATE FUNCTION
- DROP: This statement is used to drop a registered table/view/function from a current or specified Catalog. The following DROP statements are supported by Flink:
- DROP TABLE
- DROP DATABASE
- DROP VIEW
- DROP FUNCTION
- ALTER: This statement is used to alter a registered table/view/function definition from the current or specified Catalog. The following ALTER statements are supported by Flink:
- ALTER TABLE
- ALTER DATABASE
- ALTER FUNCTION
- INSERT: These statements are used to add rows to the tables.
- DESCRIBE: It is used to describe the schema of a table or a view.
- EXPLAIN: This statement is used to explain the query plans (logical and optimised) of a query or an INSERT command.
Report an error