2017-09-01 51 views
0

尝试使用apache drill 1.11.0在下面的csv文件上进行select *查询。Apache钻取未能读取此csv

id,email,first_name,last_name,middle_name,suffix,work_phone,mobile_phone,gender,picture,speciality,taxonomy_code,education_details,experience_details,keywords,doctor_npi,wait_time,created_tstamp,created_by,last_updated_tstamp,last_updated_by,is_deleted 
1,[email protected],XXXXX,XXXX,,Dr,912225711234,,M,assets/images/doctorIcon.png,Primary Care Physician,Primary Care Doctor,M.D,3 years,Primary Care Doctor,1043259765,10,2015-04-22 17:20:48.0,,2015-12-16 12:06:27.0,,N 
2,[email protected],XXXX,XXXX,,Dr,913375311234,,M,assets/images/doctorIcon.png,Eye Doctor,EYE Care Doctor,MD,5 years,,1619932076,20,2015-04-30 11:07:57.0,,2015-11-07 08:49:57.0,,N 

我得到这个错误:

org.apache.drill.common.exceptions.UserRemoteException: DATA_READ ERROR: Error processing input: , line=1, char=292. Content parsed: [ ] Failure while reading file file:/..... Happened at or shortly before byte position 292. Fragment 0:0 [Error Id: 1ce7d94a-c06e-4633-af97-f3eceb1b5350 on 172.16.16.57:31010] 

这里有什么问题?

回答

0

不知何故列标题名称“后缀”不起作用。如果我使用任何其他标题名称它的作品。

1

这似乎是Apache Drill中的一个错误,但Praveen是正确的问题与后缀列有关。后缀列是Drill(filename,suffix,fqn,filepath)[4]中的四个隐式列之一。尽管这里预期的行为应该是隐式列后缀输出(即csv)而不是错误的结果。我会为此提交Jira。

如果列名与隐式列名相同,则可以使用ALTER SYSTEM|SESSION SET命令更改默认隐式列名。 例如: ALTER session SET `drill.exec.storage.implicit.suffix.column.label` = 'appendix';

[1] https://drill.apache.org/docs/querying-a-file-system-introduction/

+0

创建吉拉 - https://issues.apache.org/jira/browse/DRILL-5767 –