Configuration Item | Description |
Resource Configuration Method | Divided into two methods: cluster default configuration and custom configuration 1. Use cluster default configuration Use the current task computational resource cluster configuration 2. Customize User customizes Executor and Driver configurations. |
Executor resource | Enter the required resource count. 1 cu is roughly equivalent to 1 core CPU and 4 GB memory. 1. Small: A single calculation unit (1 cu) 2. Medium: Two calculation units (2 cu) 3. Large: Four calculation units (4 cu) 4. Xlarge: Eight calculation units (8 cu) |
Number of Executors | An Executor is a compute node or compute instance responsible for executing tasks and handling computing work. The resources used by each Executor are the configured number of resources. |
driver resource | Enter the required number of Driver resources. 1 cu is roughly equivalent to 1 core CPU and 4 GB memory. 1. Small: A single calculation unit (1 cu) 2. Medium: Two calculation units (2 cu) 3. Large: Four calculation units (4 cu). 4. Xlarge: Eight calculation units (8 cu). |
-- Create a user information tablecreate 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 tableinsert 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;
CREATE TABLE `cpt_demo`.`dempts` (id bigint COMMENT 'id number',num int,eno float,dno double,cno decimal(9,3),flag boolean,data string,ts_year timestamp,date_month date,bno binary,point struct<x: double, y: double>,points array<struct<x: double, y: double>>,pointmaps map<struct<x: int>, struct<a: int>>)COMMENT 'table documentation'PARTITIONED BY (bucket(16, id), years(ts_year), months(date_month), identity(bno), bucket(3, num), truncate(10, data));
CREATE TABLE `cpt_demo`.`dempts` (id bigint COMMENT 'id number',num int,eno float,dno double,cno decimal(9,3),flag boolean,data string,ts_year timestamp,date_month date,bno binary,point struct<x: double, y: double>,points array<struct<x: double, y: double>>,pointmaps map<struct<x: int>, struct<a: int>>)COMMENT 'table documentation'PARTITIONED BY (bucket(16, id), years(ts_year), months(date_month), identity(bno), bucket(3, num), truncate(10, data));
CREATE TABLE `cpt_demo`.`dempts` (id bigint COMMENT 'id number',num int,eno float,dno double,cno decimal(9,3),flag boolean,data string,ts_year timestamp,date_month date,bno binary,point struct<x: double, y: double>,points array<struct<x: double, y: double>>,pointmaps map<struct<x: int>, struct<a: int>>)COMMENT 'table documentation'PARTITIONED BY (id, ts_year, date_month);