tencent cloud

Tencent Cloud WeData

Impala

PDF
포커스 모드
폰트 크기
마지막 업데이트 시간: 2024-11-01 16:26:14
Note:
You need to start the EMR component services for Impala in the cluster.
1. The current user has permissions in the EMR cluster.
2. The corresponding database has been created in Impala, such as the wedata_demo_db in the example.

Sample code

-- Create a User Information Table
create table if not exists 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 wedata_demo_db.user_info values ('001', 'Zhang San', 28, 'Beijing');
insert into wedata_demo_db.user_info values ('002', 'Li Si', 35, 'Shanghai');
insert into wedata_demo_db.user_info values ('003', 'Wang Wu', 22, 'Shenzhen');
insert into wedata_demo_db.user_info values ('004', 'Zhao Liu', 45, 'Guangzhou');
insert into wedata_demo_db.user_info values ('005', 'Xiao Ming', 20, 'Beijing');
insert into wedata_demo_db.user_info values ('006', 'Xiao Hong', 30, 'Shanghai');
insert into wedata_demo_db.user_info values ('007', 'Xiao Gang', 25, 'Shenzhen');
insert into wedata_demo_db.user_info values ('008', 'Xiao Li', 40, 'Guangzhou');
insert into wedata_demo_db.user_info values ('009', 'Xiao Zhang', 23, 'Beijing');
insert into wedata_demo_db.user_info values ('010', 'Xiao Wang', 50, 'Shanghai');

select * from wedata_demo_db.user_info;

도움말 및 지원

문제 해결에 도움이 되었나요?

피드백