加载数据时出现意外错误 [英] Unexpected error while loading data

查看:111
本文介绍了加载数据时出现意外错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到意外错误。我尝试了几次,但仍然无法加载数据。有没有其他的方式来加载数据?

  gs://log_data/r_mini_raw_20120510.txt.gzto567402616005:myv.may10c 
错误:
意外。请再试一次。
作业ID:job_4bde60f1c13743ddabd3be2de9d6b511
开始时间:2012年5月12日下午1:48
结束时间:2012年5月12日下午1:51
目的地表:567402616005:myvserv.may10c
源URI:gs://log_data/r_mini_raw_20120510.txt.gz
分隔符:^
最大不良记录:30000
架构:
zoneid:STRING
creativeid :STRING
ip:STRING

更新



我正在使用可在此处找到的文件:

http://saraswaticlasses.net/bad.csv.zip

  bq load -F'^'--max_bad_record = 30000 mycompany.abc bad.csv id:STRING,ceid:STRING,ip:STRING,cb:STRING,country:STRING,telco_name:STRING,date_time:STRING,二级:STRING,MN:STRING,SF:STRING,UUID:STRING,UA:STRING,品牌:STRING,型号:STRING,操作系统:STRING,OSVERSION:STRING,SH:STRING,SW:STRING,代理:STRING啊: STRING,回调:STRING 

一个错误加载操作中的BigQuery错误:意外。






同样的文件可以在Ubuntu上运行,而CentOS 5.4(Final)
是否需要检查操作系统编码?

解决方案

您上传的文件有未终止的报价。并再试一次?我已经提交了一个内部的bigquery bug来更好地处理这种情况。

  $ grep' 'bad.csv 
3000 ^ 0 ^ 1.202.218.8 ^ 2f1f1491 ^ CN ^ others ^ 2012-05-02 20:35:00 ^^^^^Mozilla / 5.0 ^ generic web browser ^^^^^ ^^^

当我从工作站(Ubuntu)运行加载时,请注意,如果您使用的文件较大,则不会看到此警告,而只会失败。

  ... 
status:{
errors:[
{
位置:行:29057 / Field:12,
消息:缺少双引号(\)字符:字段以:< Mozilla />,
reason:无效
}
开头]


I am getting an "Unexpected" error. I tried a few times, and I still could not load the data. Is there any other way to load data?

gs://log_data/r_mini_raw_20120510.txt.gzto567402616005:myv.may10c
Errors:
Unexpected. Please try again.
Job ID: job_4bde60f1c13743ddabd3be2de9d6b511
Start Time: 1:48pm, 12 May 2012
End Time: 1:51pm, 12 May 2012
Destination Table: 567402616005:myvserv.may10c
Source URI: gs://log_data/r_mini_raw_20120510.txt.gz
Delimiter: ^
Max Bad Records: 30000
Schema:
zoneid: STRING
creativeid: STRING
ip: STRING

update:

I am using the file that can be found here:

http://saraswaticlasses.net/bad.csv.zip

bq load -F '^' --max_bad_record=30000 mycompany.abc bad.csv  id:STRING,ceid:STRING,ip:STRING,cb:STRING,country:STRING,telco_name:STRING,date_time:STRING,secondary:STRING,mn:STRING,sf:STRING,uuid:STRING,ua:STRING,brand:STRING,model:STRING,os:STRING,osversion:STRING,sh:STRING,sw:STRING,proxy:STRING,ah:STRING,callback:STRING

I am getting an error "BigQuery error in load operation: Unexpected. Please try again."


The same file works from Ubuntu while it does not work from CentOS 5.4 (Final) Does the OS encoding need to be checked?

解决方案

The file you uploaded has an unterminated quote. Can you delete that line and try again? I've filed an internal bigquery bug to be able to handle this case more gracefully.

$grep '"' bad.csv
3000^0^1.202.218.8^2f1f1491^CN^others^2012-05-02 20:35:00^^^^^"Mozilla/5.0^generic web browser^^^^^^^^

When I run a load from my workstation (Ubuntu), I get a warning about the line in question. Note that if you were using a larger file, you would not see this warning, instead you'd just get a failure.

$bq show --format=prettyjson  -j job_e1d8636e225a4d5f81becf84019e7484
...
"status": {
  "errors": [
  {
    "location": "Line:29057 / Field:12", 
    "message": "Missing close double quote (\") character: field starts with: <Mozilla/>", 
    "reason": "invalid"
  }
]

这篇关于加载数据时出现意外错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆