1 create csv file.
student.csv

4,Rose,M,78,77,76
5,Mike,F,99,98,98

2 put it to hdfs.

# hdfs dfs -put student.csv /input

3 create table in hive.

create table student_csv
(sid int, sname string, gender string, language int, math int, english int)
row format delimited fields terminated by ',' stored as textfile;

4 load hdfs file to hive.

load data inpath '/input/student.csv' into table student_csv;

5 verify.

hive> select * from student_csv;
OK
4 Rose M 78 77 76
5 Mike F 99 98 98

Hive_hdfs csv导入hive demo的更多相关文章

  1. 数据可视化基础专题(三):Pandas基础(二) csv导入与导出

    1.csv导入 1.1 csv导入 .read_csv()函数 pandas.read_csv(filepath_or_buffer: Union[str, pathlib.Path, IO[~Any ...

  2. sqoop将关系型数据库的表导入hive中

    1.sqoop 将关系型数据库的数据导入hive的参数说明:

  3. 将数据导入hive,将数据从hive导出

    一:将数据导入hive(六种方式) 1.从本地导入 load data local inpath 'file_path' into table tbname; 用于一般的场景. 2.从hdfs上导入数 ...

  4. Mysql 上亿级数据导入Hive思路分享

    前提条件: 数据库容量上亿级别,索引只有id,没有创建时间索引 达到目标: 把阿里云RDS Mysql表数据同步到hive中,按照mysql表数据的创建时间日期格式分区,每天一个分区方便查询 每天运行 ...

  5. sqoop mysql导入hive 数值类型变成null的问题分析

    问题描述:mysql通过sqoop导入到hive表中,发现有个别数据类型为int或tinyint的列导入后数据为null.设置各种行分隔符,列分隔符都没有效果. 问题分析:hive中单独将有问题的那几 ...

  6. 042 将数据导入hive,将数据从hive导出

    一:将数据导入hive(六种方式) 1.从本地导入 load data local inpath 'file_path' into table tbname; 用于一般的场景. 2.从hdfs上导入数 ...

  7. [hadoop读书笔记] 第十五章 sqoop1.4.6小实验 - 将mysq数据导入hive

    安装hive 1.下载hive-2.1.1(搭配hadoop版本为2.7.3) 2.解压到文件夹下 /wdcloud/app/hive-2.1.1 3.配置环境变量 4.在mysql上创建元数据库hi ...

  8. hive-hbase-handler方式导入hive表数据到hbase表中

    Hive与HBase的整合功能的实现是利用两者本身对外的API接口互相进行通信,相互通信主要是依靠hive-hbase-handler.jar工具类 : hive-hbase-handler.jar在 ...

  9. mariadb审计日志通过 logstash导入 hive

    我们使用的 mariadb, 用的这个审计工具 https://mariadb.com/kb/en/library/mariadb-audit-plugin/ 这个工具一点都不考虑后期对数据的处理, ...

随机推荐

  1. [转]各种开源协议介绍 BSD、Apache Licence、GPL V2 、GPL V3 、LGPL、MIT

    现今存在的开源协议很多,而经过Open Source Initiative组织通过批准的开源协议目前有58种(http://www.opensource.org/licenses /alphabeti ...

  2. Spring MVC配置详解(3)

    一.Spring MVC环境搭建:(Spring 2.5.6 + Hibernate 3.2.0) 1. jar包引入 Spring 2.5.6:spring.jar.spring-webmvc.ja ...

  3. C#图片压缩类winform

    using System;using System.Collections.Generic;using System.Text;using System.Drawing;using System.Dr ...

  4. C#设计模式(9)——装饰者模式

    一.概念 装饰者模式以对客户透明的方式动态地给一个对象附加上更多的责任,装饰者模式相比生成子类可以更灵活地增加功能. 二.模型 三.代码实现 /// <summary> /// 手机抽象类 ...

  5. linux日常管理-rsync常用选项详解

    -av 同步目录 写法 123/   /tmp/333/ 意思是把123下的文件同步到/tmp/333/下  结尾不加/ 只同步目录 两个目录一样的. //////////////////////// ...

  6. JAVA基础知识总结2(语法基础)

    关键字:其实就是某种语言赋予了特殊含义的单词. 保留字:暂时还未规定为关键字的单词,保留准备日后要使用的单词. 标识符:开发人员程序中自定义名词,比如类名,变量名,函数名. PS:1.不能使用关键字. ...

  7. warning no newline at the end of file

    main.c :10:2 warning: no newline at the end of file 修复这个警告,在文件结尾回车一下就行了.可以很少会有人去仔细探究,为什么gcc会给出这么一个警告 ...

  8. error C2144: 语法错误:“int”的前面应有“;”

    error C2144: 语法错误:"int"的前面应有";" C++- error C2144 syntax error : 'int' should be ...

  9. JavaScript: 高级技巧: window 对象也可以添加自定义属性

    JavaScript: 高级技巧: window 对象也可以添加自定义属性 例如 window.ntName = 'a';例如 window.ntXw = top; 优点是, window 无须等加载 ...

  10. MD5Init-MD5Update-MD5Final

    MD5Init是一个初始化函数,初始化核心变量,装入标准的幻数 MD5Update是MD5的主计算过程,inbuf是要变换的字节串,inputlen是长度,这个函数由getMD5ofStr调用,调用之 ...