Database Reference
In-Depth Information
• Data corruption at some point in the pipeline
• Bad data in fields such as invalid UTF-8 characters
These errors fit the label of data errors. In addition a load operation can fail
due to a configuration error or a quota error. Possible configuration errors
are:
• Permission errors
• Quota limits
• Data size limits
• Non-existent sources or destination table
Data errors are somewhat different from the other types of errors because a
load job can have many data errors and can be configured to succeed even
if data errors are present. The other types of errors always cause the job
to fail. As covered in Chapter 5, the jobs resource in the API has a status
section, which contains two fields related to errors. The errorResult
field is present if the job is done and has failed. The errors field is a list
of objects with the same structure as errorResult and may be present
even if the job completed successfully. As such, the errors field is better
interpreted as a list of warnings and errors. Most job types in the service do
not generate warnings that appear in this field. Load jobs, however, use this
field to report data errors. It is often the case that the input data has multiple
data errors, and it would be inconvenient if each run of a load job reported
only a single error. So assuming the absence of configuration and quota
errors, a load job reports zero or more errors in the errors field, and if the
job failed, one of the entries in the list also appears in the errorResult
field.
Unlike data errors, configuration errors can show up in two different
locations. A configuration or quota error that causes the job creation request
to fail results in a top-level error (HTTP error codes 40x) being returned in
the response to the creation request. Configuration errors that occur after
the job has been created have the error reported in the errorResult field
and included in the errors list.
To see all this in action, here are sample jobs that generate errors of all sorts.
These examples do not bother with errors that cause the job creation to fail
because that is covered in Chapter 5 and is not specific to load jobs. Instead,
Search WWH ::




Custom Search