This topic describes common SQL statements supported by Data Lake Analytics (DLA).
DLA Presto is developed based on Presto. The DDL statements of DLA are Hive-compatible, and the DML statements support the ANSI SQL syntax.
DDL
Common DDL statements
CREATE SCHEMA: creates a schema or database.
CREATE TABLE: creates a table.
DROP SCHEMA: deletes a schema or database.
DROP TABLE: deletes a table.
ALTER TABLE: modifies the table schema or partition information.
Metadata-related statements if the data source is OSS
MSCK REPAIR TABLE: synchronizes partition information of OSS to metadata partitions.
MSCK REPAIR TABLE SYNC_DIR: synchronizes partition information in a directory of OSS to metadata partitions.
Metadata-related statements if the data source is a database
MSCK REPAIR DATABASE: automatically associates all the tables in the source database.
CREATE TABLE LIKE MAPPING: automatically determines the schema of the destination table based on the table schema of the source.
Common query DDL statements
SHOW SCHEMAS: queries all the schemas or databases of a specific user.
SHOW TABLES: queries tables in the current schema.
SHOW CREATE TABLE: views the CREATE TABLE statement.
SHOW PARTITIONS: shows information about all the partitions in a table.
SHOW QUERY_TASK: queries the query task information of a specific user.
DML
ACL