当前位置:网站首页>Data Analysis Tools - DDL operations & DML operations in HQL
Data Analysis Tools - DDL operations & DML operations in HQL
2022-07-30 15:42:00 【Getullo Book】
DDL operations in HQL
Create table statement
1) table creation method:
Create table:
CREATE [EXTERNAL] TABLE [IF NOT EXISTS] table_name
[(col_name data_type [COMMENT col_comment], ...)]
[COMMENT table_comment]
[PARTITIONED BY (col_name data_type [COMMENT col_comment], ...)]
[CLUSTERED BY (col_name, col_name, ...) [SORTED BY (col_name [ASC|DESC], ...)] INTO num_buckets BUCKETS]
[ROW FORMAT row_format]
[STORED AS file_format]
[LOCATION hdfs_path]
Description:
1.1) CREATE TABLE creates a table with the specified name.If a table with the same name already exists, an exception is thrown; the user can ignore this exception with the IF NOT EXISTS option.
1.2) The EXTERNAL keyword allows users to create an external table and specify a path (LOCATION) pointing to the actual data while creating the table. When Hive creates an internal table, it will move the data to the path pointed to by the data warehouse; ifCreate an external table that only records the path where the data is located, without making any changes to the location of the data.When a table is dropped, the metadata and data of the internal table will be included together
边栏推荐
猜你喜欢
数据库-SQL
GeoServer + openlayers
GUCCI、LV等奢侈品巨头如何布局元宇宙的,其他品牌应该跟上吗?
Excel使用Visual Basic Editor对宏进行修改
二、判断 & 循环
Distributed pre-course: MySQL implements distributed locks
嵌入式开发:嵌入式基础知识——正确启动固件项目的 10 条建议
4 senior experts share the insider architecture design and implementation principles of Flink technology with years of experience in large factories
Shell脚本的概念
【重磅来袭】教你如何在RGBD三维重建中获取高质量模型纹理
随机推荐
工具| execsnoop 短时进程追踪工具
MASM32v11编程调用Process32First失败: 程序发出命令,但命令长度不正确
About the data synchronization delay of MySQL master-slave replication
TensorFlow custom training function
Debug - Notes
定时任务 corn
TiDB 工具下载
后浪来袭!阿里产出“第二代”容器技术手册及脑图,这也太香了吧
本地事务与分布式事务
Flink本地UI运行
Example of video switching playback (video switching example) code
编译、链接 - 笔记 - 3
Flask之路由(app.route)详解
MySQL客户端工具的使用与MySQL SQL语句
GUCCI、LV等奢侈品巨头如何布局元宇宙的,其他品牌应该跟上吗?
Changing SELECT...FROM to FROM...SELECT doesn't 'fix' SQL
Back waves are coming!Ali produced the "second generation" container technical manual and brain map, which is too fragrant
难道Redis真的变慢了吗?
Kubernetes应用管理深度剖析
How to split microservices?