HIVE仓库基础知识:基本命令
2018-03-08 14:25
399 查看
1.从hive中查询并导出为txt文件到Linux服务器上:hive -e "select * from xj6500.fct_vecl_insur_pft_2 where daypt between '2017-10-31' and '2017-11-28'" > /home/data/hiveexport/fct_vecl_insur_pft_3/fct_vecl_insur_pft_3.txt;
2.直接执行hql文件hive -f /opt/xj6500_data/hive_sql/updatesql.hql
编码后:hive\u0020-f\u0020/opt/xj6500_data/hive_sql/updatesql.hql
3.从文本向数据库表加载数据(注意:此时的表类型必须为textfile格式)load data local inpath '/opt/spacewalk/hy_test.txt' into table test_hy2;
4.从hive中查询并到出txt文件到hdfs上
insert overwrite local directory '/data/spacewalk/origin_file/hive/dim_agent_l1_channel' ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' STORED AS TEXTFILE select * from dim_agent_l1_channel;
2.直接执行hql文件hive -f /opt/xj6500_data/hive_sql/updatesql.hql
编码后:hive\u0020-f\u0020/opt/xj6500_data/hive_sql/updatesql.hql
3.从文本向数据库表加载数据(注意:此时的表类型必须为textfile格式)load data local inpath '/opt/spacewalk/hy_test.txt' into table test_hy2;
4.从hive中查询并到出txt文件到hdfs上
insert overwrite local directory '/data/spacewalk/origin_file/hive/dim_agent_l1_channel' ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' STORED AS TEXTFILE select * from dim_agent_l1_channel;
相关文章推荐
- linux 基础知识总结-----基本命令
- [完]基于Hadoop的数据仓库Hive 基础知识
- HDFS基本知识:基础命令
- git仓库相关知识01-安装和基本命令
- 基于Hadoop的数据仓库Hive 基础知识
- Linuxl下C编程系列--基础知识及基本命令
- 1、基础命令和基本知识
- SQLServer学习笔记<>.基础知识,一些基本命令,单表查询(null top用法,with ties附加属性,over开窗函数),排名函数
- linux 操作系统基础知识和基本命令 笔记
- 2017-10-7Linux基础知识(5)基本命令
- linux云自动化运维基础知识3(系统的基本命令)
- mongodb基础命令及基本知识
- Linux的一些基本命令--入门级Linux基础知识
- Linux基础知识及常用命令
- 2017-10-27Linux基础知识(9)bash基础特性及基础命令
- Linux运维基本知识与命令
- hive 数据源 使用mysql; hive 启动报错; 加载数据 建表等基本命令
- Email基础知识: SMTP/POP3 命令简介
- 一脸懵逼学习Hive(数据仓库基础构架)