create database hivewithcos location 'cosn://huadong/hive';
huadong is the bucket name, and hive is the path, which can be set as needed. After creating the database, you can create a data table. Then, load data into the table, which can be used in exactly the same way as HDFS.create table record(id int, name string) row format delimited fields terminated by ',' stored as textfile;
create table record(id int, name string) row format delimited fields terminated by ',' stored as textfile location 'cosn://huadong/hive/cos';
Feedback