导入数据存储备份时,大查询加载失败并出现错误字符 (ASCII 0)

Posted

技术标签:

【中文标题】导入数据存储备份时,大查询加载失败并出现错误字符 (ASCII 0)【英文标题】:Big query load fails with Bad Character (ASCII 0) while importing Datastore backup 【发布时间】:2015-03-26 08:44:58 【问题描述】:

这可能看起来像已经讨论过的场景。我正在尝试使用 Talend tBigQueryBulkExec 组件将 Google App Engine DataStore 备份加载到 BQ 中,该组件与 BQ Shell CLI 相同。它连接到 BQ 并尝试从 GCS 读取文件并移动到组件设置中给定的已定义 Dataset.Tablename。

错误信息:

location":"File: 0 / Line:8 / Field:1","message":"遇到错误字符 (ASCII 0):字段开头为:","re​​ason":"invalid"

整个消息:

"configuration":"load":"createDisposition":"CREATE_NEVER","destinationTable":"datasetId":"sample_red","projectId":"test","tableId":"bqload1" ,"schema":"fields":["name":"file","type":"STRING"],"skipLeadingRows":1,"sourceUris":["gs:// test. appspot.com/bucket/ahFzfnZpcmdpbi1yZWQtdGVzdHJBCxIcX0FFX0RhdGFzdG9yZUFkbWluX09wZXJhdGlvbhiB64MBDAsSFl9BRV9CYWNrdXBfSW5mb3JtYXRpb24YAQw.Challenge.backup_info"],"writeDisposition":"WRITE_TRUNCATE","etag":"\"AJDc2PKvhXhnNlIwTi02BO3aoe8/1ZnlNbMA0eEnHxZQC_gKepG8Mio\"","id “:” 测试:job_yFJa_JVN0E05GZQZNvtlZR6Bgjo “” jobReference ":"jobId":"job_yFJa_JVN0E05GZQZNvtlZR6Bgjo","projectId":"test","kind":"bigquery#job","selfLink":"https://www.googleapis.com/bigquery/v2/projects/buckett/jobs/job_yFJa_JVN0E05GZQZNvtlZR6Bgjo","statistics":"endTime":" 1427358416307","startTime":"1427358414687","creationTime":"1427358397621","load":"inputFiles":"1","inputFileBytes":"565","outputRows":"0","outputBytes ":"0","status":"errorResult":"location":"File: 0 / Line:11 / Field:1","message":"遇到错误字符(ASCII 0):字段开始机智h: ","re​​ason":"invalid","errors":["location":"File: 0 / Line:5 / Field:1","message":"错误字符 (ASCII 0) 遇到:字段开头为:","re​​ason":"invalid","location":"File: 0 / Line:6 / Field:1","message":"Bad遇到字符(ASCII 0):字段开头为:","re​​ason":"invalid","location":"File: 0 / Line:8 / Field:1","message":"遇到错误字符 (ASCII 0):字段以:","re​​ason":"invalid","location":"File: 0 / Line:10 / Field:1","message":"Bad character ( ASCII 0) 遇到:字段以:","re​​ason":"invalid","location":"File: 0 / Line:11 / Field:1","message":"Bad character (ASCII 0)遇到:字段开头为:","re​​ason":"invalid"],"state":"DONE","user_email":"xx@gmail.com"

我从其他帖子中读到,Bad Character ASCII 是一个错误,将在下一个版本中修复,还没有完成吗?

【问题讨论】:

【参考方案1】:

您那里似乎有一个 unicode 制表符,而 Talend 无法正确解析它,因为它需要 ASCII 文本。

如果您转到 tBigQueryBulkExec 组件的高级设置,则应该有一个编码选项。如果您将其设置为“utf-8”,现在应该可以使用了。

【讨论】:

我试过了,也没有用。问题是我不知道 Datastore 备份文件是什么格式。

以上是关于导入数据存储备份时,大查询加载失败并出现错误字符 (ASCII 0)的主要内容,如果未能解决你的问题,请参考以下文章

华为云空间电脑端加载资源文件失败

Confluence 6 XML 备份失败的问题解决

Confluence 6 XML 备份失败的问题解决

解决办法:由于oracle版本不同导致导入数据时失败

将大型数据集从 Redshift 卸载到 S3 失败并出现 I/O 错误

列存储索引创建失败并出现此错误“资源池'默认'中没有足够的内存来运行此查询”