上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 25 下一页
摘要: 用户可以使用ALTER DATABASE命令为某个数据库的DBPROPERTIES设置键-值对属性值,来描述这个数据库的属性信息。数据库的其他元数据信息都是不可更改的,包括数据库名和数据库所在的目录位置。 hive (default)> alter database db_hive set dbpr 阅读全文
posted @ 2019-11-04 23:26 tunan96 阅读(949) 评论(0) 推荐(0) 编辑
摘要: 1.删除空数据库 hive>drop database db_hive2; 2.如果删除的数据库不存在,最好采用 if exists判断数据库是否存在 hive> drop database db_hive; FAILED: SemanticException [Error 10072]: Data 阅读全文
posted @ 2019-11-04 23:26 tunan96 阅读(8241) 评论(0) 推荐(1) 编辑
摘要: 显示数据库 1.显示数据库 hive> show databases; 2.过滤显示查询的数据库 hive> show databases like 'db_hive*'; OK db_hive db_hive_1 查看数据库详情 1.显示数据库信息 hive> desc database db_h 阅读全文
posted @ 2019-11-04 23:25 tunan96 阅读(383) 评论(0) 推荐(0) 编辑
摘要: CREATE DATABASE [IF NOT EXISTS] database_name [COMMENT database_comment] [LOCATION hdfs_path] [WITH DBPROPERTIES (property_name=property_value, ...)]; 阅读全文
posted @ 2019-11-04 23:23 tunan96 阅读(2340) 评论(0) 推荐(0) 编辑
摘要: 基本数据类型 Hive数据类型 Java数据类型 长度 例子 TINYINT byte 1byte有符号整数 20 SMALINT short 2byte有符号整数 20 INT int 4byte有符号整数 20 BIGINT long 8byte有符号整数 20 BOOLEAN boolean 阅读全文
posted @ 2019-11-04 23:22 tunan96 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 1.退出hive窗口: hive(default)>exit; hive(default)>quit; 在新版的hive中没区别了,在以前的版本是有的: exit:先隐性提交数据,再退出; quit:不提交数据,退出; 2.在hive cli命令窗口中如何查看hdfs文件系统 hive(defaul 阅读全文
posted @ 2019-11-04 23:13 tunan96 阅读(173) 评论(0) 推荐(0) 编辑
摘要: Hive数据仓库位置配置 1)Default数据仓库的最原始位置是在hdfs上的:/user/hive/warehouse路径下。 2)在仓库目录下,没有对默认的数据库default创建文件夹。如果某张表属于default数据库,直接在数据仓库目录下创建一个文件夹。 3)修改default数据仓库原 阅读全文
posted @ 2019-11-04 23:13 tunan96 阅读(144) 评论(0) 推荐(0) 编辑
摘要: [atguigu@hadoop102 hive]$ bin/hive -help usage: hive -d,--define <key=value> Variable subsitution to apply to hive commands. e.g. -d A=B or --define A 阅读全文
posted @ 2019-11-04 23:12 tunan96 阅读(236) 评论(0) 推荐(0) 编辑
摘要: 启动hiveserver2服务 [atguigu@hadoop102 hive]$ bin/hiveserver2 启动beeline [atguigu@hadoop102 hive]$ bin/beeline Beeline version 1.2.1 by Apache Hive beeline 阅读全文
posted @ 2019-11-04 23:11 tunan96 阅读(307) 评论(0) 推荐(0) 编辑
摘要: 驱动拷贝 1.在/opt/software/mysql-libs目录下解压mysql-connector-java-5.1.27.tar.gz驱动包 [root@hadoop102 mysql-libs]# tar -zxvf mysql-connector-java-5.1.27.tar.gz 2 阅读全文
posted @ 2019-11-04 23:10 tunan96 阅读(159) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 25 下一页