3
votes

This may look like already discussed scenario. I am trying to load Google App Engine DataStore backup into BQ using Talend tBigQueryBulkExec component, which does same as BQ Shell CLI. It connects to BQ and tries to read files from GCS and move to defined Dataset.Tablename as given in component settings.

Error Message:

location":"File: 0 / Line:8 / Field:1","message":"Bad character (ASCII 0) encountered: field starts with: ","reason":"invalid"}

Entire message:

{"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":" test: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":"Bad character (ASCII 0) encountered: field starts with: <\u000Bcontent>","reason":"invalid"},"errors":[{"location":"File: 0 / Line:5 / Field:1","message":"Bad character (ASCII 0) encountered: field starts with: <\u0006status\u0012>","reason":"invalid"},{"location":"File: 0 / Line:6 / Field:1","message":"Bad character (ASCII 0) encountered: field starts with: <\tstartDa>","reason":"invalid"},{"location":"File: 0 / Line:8 / Field:1","message":"Bad character (ASCII 0) encountered: field starts with: ","reason":"invalid"},{"location":"File: 0 / Line:10 / Field:1","message":"Bad character (ASCII 0) encountered: field starts with: ","reason":"invalid"},{"location":"File: 0 / Line:11 / Field:1","message":"Bad character (ASCII 0) encountered: field starts with: <\u000Bcontent>","reason":"invalid"}],"state":"DONE"},"user_email":"[email protected]"}

I read from other posts which says Bad Character ASCII is a bug and which will be fixed in next release, is it not done yet?

1

1 Answers

2
votes

It looks like you have a unicode tab character there and Talend is failing to parse it properly as it is expecting ASCII text.

If you go to the advanced settings of the tBigQueryBulkExec component there should be an option for encoding. If you set this to "utf-8" this should now work.