Manage DLF Paimon views
This topic describes how Paimon views work and how to use SQL to create, view, delete, and modify the dialect of a view.
How it works
A Paimon view is a logical table that encapsulates business logic.
Manage views
Use standard SQL Data Definition Language (DDL) statements to create and delete Paimon views.
Create or replace a view
Run CREATE VIEW or CREATE OR REPLACE VIEW to register a view. The system assigns a universally unique identifier (UUID), writes the initial metadata file, and sets the version number to 1.
CREATE VIEW `paimon_catalog`.`default`.`sales_view` AS
SELECT region, SUM(amount) AS total_amount
FROM `paimon_catalog`.`default`.`sales`
GROUP BY region;
Always use the fully qualified name—catalog.database.object—when creating or querying a view. Omitting any component can cause errors across different environments.
View created views in the console
-
In the navigation pane on the left, choose Catalogs, then click the name of your catalog to open its details page.
-
Click the name of the database to open the database details page.
-
Click the Views tab.
Delete a view
DROP VIEW `paimon_catalog`.`default`.`sales_view`;
Modify a view's SQL dialect
Call a system stored procedure to modify the SQL dialect associated with a view. This supports cross-engine migration and lets you target a specific execution engine.
For the full procedure reference, see Alter view dialect via procedure in the Apache Paimon documentation.