【发布时间】:2018-10-25 01:18:34
【问题描述】:
这是我的数据源中的列
BibNum
Title
Author
ISBN
PublicationYear
Publisher
Subjects
ItemType
ItemCollection
FloatingItem
ItemLocation
ReportDate
ItemCount
我只得到publisher 列的值。
我上传了一个截图,如果你知道原因和方法可以修复,请告诉我,将不胜感激:
下面是第一行的真实值(我用//标记分隔每一列)
3011076//
A tale of two friends / adapted by Ellie O'Ryan ; illustrated by Tom Caulfield, Frederick Gardner, Megan Petasky, and Allen Tam. //
O'Ryan, Ellie //
1481425730, 1481425749, 9781481425735, 9781481425742 //
2014 //
Simon Spotlight, Musicians Fiction, Bullfighters Fiction, Best friends Fiction, Friendship Fiction, Adventure and adventurers Fiction //
jcbk //
ncrdr //
Floating //
qna //
09/01/2017 //
1
这是第二行的真实值
2248846 //
Naruto. Vol. 1, Uzumaki Naruto / story and art by Masashi Kishimoto ; [English adaptation by Jo Duffy]. //
Kishimoto, Masashi, 1974- //
1569319006 //
2003, c1999. //
Viz, Ninja Japan Comic books strips etc, Comic books strips etc Japan Translations into English, Graphic novels //
acbk//
nycomic//
NA//
lcy//
09/01/2017//
1
hive> select * from timesheet limit 3;
OK
NULL Title Author ISBN PublicationYear Publisher Subjects ItemType ItemCollection FloatingItem ItemLocation ReportDate ItemCount
3011076 "A tale of two friends / adapted by Ellie O'Ryan ; illustrated by Tom Caulfield Frederick Gardner Megan Petasky and Allen Tam." "O'Ryan Ellie" "1481425730 1481425749 9781481425735 9781481425742" 2014. "Simon Spotlight
2248846 "Naruto. Vol. 1 Uzumaki Naruto / story and art by Masashi Kishimoto ; [English adaptation by Jo Duffy]." "Kishimoto Masashi 1974-" 1569319006 "2003 c1999." "Viz " "Ninja Japan Comic books strips etc Comic books strips etc Japan Translations into English
Time taken: 0.149 seconds
hive> desc timesheet
> ;
OK
bibnum bigint
title string
author string
isbn string
publication string
publisher string
subjects string
itemtype string
itemcollection string
floatingitem string
itemlocation string
reportdate string
itemcount string
Time taken: 0.21 seconds
BibNum,Title,Author,ISBN,PublicationYear,Publisher,Subjects,ItemType,ItemCollection,FloatingItem,ItemLocation,ReportDate,ItemCount |空 |空 |空 |空 |空 |空 |空 |空 |空 |空 |空 |空 | |
3011076,"两个朋友的故事 / 由 Ellie O'Ryan 改编;由 Tom Caulfield、Frederick Gardner、Megan Petasky 和 Allen Tam 绘制。","O'Ryan, Ellie","1481425730, 1481425749, 9781481425735 , 9781481425742",2014.,"Simon Spotlight,","音乐家小说, 斗牛士小说, 好朋友小说, 友谊小说, 冒险和冒险家小说",jcbk,ncrdr,浮动,qna,09/01/2017,1 |空 |空 |空 |空 |空 |空 |空 |空 |空 |空 |空 |空|
【问题讨论】:
-
您在导入时是否引用了新数据集中的所有逗号?
-
你是怎么导入的?很可能每列中的逗号没有被转义
-
我使用的方式是先创建表,然后使用 create table table_name(column names data types..) row format delimited fields by ',' 以 '\n' 结尾的行存储为文本文件;并将路径中的数据 '/path/' 加载到表 table_name
-
你能上传一些 hive 认为的数据,而不仅仅是一张图片吗?
-
可能是逗号被引号括起来的问题
标签: hive loading import-from-csv