tencent cloud

Feedback

Overview of Standard Spark Statement

Last updated: 2024-08-07 17:35:07
    The standard Spark engine kernel is self-developed based on Spark version 3.2 and is compatible with native Spark statement and behavior. For detailed statement, see the Spark statement documentation.

    DDL Statement

    Statement Related to Database

    Purpose
    Statement
    Create a new database.
    CREATE DATABASE
    Show all databases defined in the metadata.
    SHOW DATABASES
    View database attributes.
    DESCRIBE DATABASE
    Change database attributes.
    ALTER DATABASE SET DBPROPERTIES
    Delete a database.
    DROP DATABASE

    Statement Related to Data Table

    Purpose
    Statement
    Create a new data table.
    CREATE TABLE
    Query data table creation information.
    SHOW CREATE TABLE
    Query table attributes.
    SHOW TBLPROPERTIES
    Query all tables in the database.
    SHOW TABLES
    View column information and metadata information on data table.
    DESCRIBE TABLE
    Add columns to the data table.
    ALTER TABLE ADD COLUMNS
    Add new columns to the data table.
    ALTER TABLE ADD COLUMN AFTER/FIRST
    Chang field name.
    ALTER TABLE ... RENAME COLUMN
    Delete a specific column from the data table.
    ALTER TABLE DROP COLUMN
    Add partition information to the data table.
    ALTER TABLE ADD PARTATION
    List table partitions.
    SHOW PARTITIONS
    Delete partition information from the data table.
    ALTER TABLE DROP PARTITION
    Add partition fields to the Iceberg table.
    ALTER TABLE ADD PARTITION FIELD
    Delete partition fields from the Iceberg table.
    ALTER TABLE DROP PARTITION FIELD
    Change data table attributes.
    ALTER TABLE SET TBLPROPERTIES
    Change the storage location of the data table.
    ALTER TABLE SET LOCATION
    Modify the sorting method of the table data.
    ALTER TABLE ... WRITE ORDERED BY
    Modify the allocation policy of the partitioned table.
    ALTER TABLE ... WRITE DISTRIBUTED BY PARTITION
    Update partition information.
    MSCK REPAIR TABLE
    Delete the metadata table.
    DROP TABLE
    Show the logical or physical execution plan of SQL.
    EXPLAIN
    Call the table stored procedure.
    CALL STATEMENT

    View-Related Statement

    Purpose
    Statement
    Create a view from the select results.
    CREATE VIEW AS
    Query views in the database.
    SHOW VIEWS
    View the column information of a view.
    DESCRIBE VIEW
    Show the view creation statement.
    SHOW CREATE VIEW
    View column information of the view.
    SHOW COLUMNS IN VIEW
    Rename the view.
    ALTER VIEW RENAME TO
    Modify view attributes.
    ALTER VIEW SET TBLPROPERTIES
    Delete the view.
    DROP VIEW

    Function-Related Statement

    Purpose
    Create a function.
    CREATE FUNCTION
    View function creation statement.
    SHOW FUNCTION
    Delete function.
    DROP FUNCTION

    DML Statements

    Purpose
    Insert a row of data.
    INSERT STATEMENT
    Replace a row of data.
    INSERT OVERWRITE
    Row-level data update operations, which can be used to replace INSERT OVERWRITE operations.
    MERGE INTO
    Query Iceberg table metadata.
    TABLE METADATA
    Insert query results into a data table.
    INSERT INTO
    Delete data from an Iceberg table.
    DELETE STATEMENT
    Update specific rows.
    UPDATE

    DQL Statement

    Purpose
    Query data.
    SELECT STATEMENT
    
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support