tencent cloud

Feedback

Last updated: 2024-11-01 16:26:14
    Note:
    Need to start Trino Component Services in the EMR Cluster.

    Sample code

    SHOW CATALOGS;
    SELECT current_catalog;
    
    CREATE SCHEMA IF NOT EXISTS hive.wedata_demo_db;
    
    -- Create a User Information Table
    create table if not exists hive.wedata_demo_db.user_info (
    user_id string COMMENT 'User ID',
    user_name string COMMENT 'Username',
    user_age int COMMENT 'Age',
    city string COMMENT 'City'
    ) COMMENT 'User Information Table';
    
    -- Insert data into the User Information Table
    insert into hive.wedata_demo_db.user_info values ('001', 'Zhang San', 28, 'Beijing');
    insert into hive.wedata_demo_db.user_info values ('002', 'Li Si', 35, 'Shanghai');
    insert into hive.wedata_demo_db.user_info values ('003', 'Wang Wu', 22, 'Shenzhen');
    insert into hive.wedata_demo_db.user_info values ('004', 'Zhao Liu', 45, 'Guangzhou');
    insert into hive.wedata_demo_db.user_info values ('005', 'Xiao Ming', 20, 'Beijing');
    insert into hive.wedata_demo_db.user_info values ('006', 'Xiao Hong', 30, 'Shanghai');
    insert into hive.wedata_demo_db.user_info values ('007', 'Xiao Gang', 25, 'Shenzhen');
    insert into hive.wedata_demo_db.user_info values ('008', 'Xiao Li', 40, 'Guangzhou');
    insert into hive.wedata_demo_db.user_info values ('009', 'Xiao Zhang', 23, 'Beijing');
    insert into hive.wedata_demo_db.user_info values ('010', 'Xiao Wang', 50, 'Shanghai');
    
    -- Query data
    select * from hive.wedata_demo_db.user_info;
    
    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