Skip to content

Commit 6e88d7d

Browse files
authored
docs: clarify that the presence of XyzJob.errors doesn't necessarily mean that the job has not completed or was unsuccessful (#2278)
Internal issue b/440349994
1 parent 33ea296 commit 6e88d7d

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

google/cloud/bigquery/job/base.py

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,12 @@ def transaction_info(self) -> Optional[TransactionInfo]:
693693

694694
@property
695695
def error_result(self):
696-
"""Error information about the job as a whole.
696+
"""Output only. Final error result of the job.
697+
698+
If present, indicates that the job has completed and was unsuccessful.
699+
700+
See:
701+
https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#JobStatus.FIELDS.error_result
697702
698703
Returns:
699704
Optional[Mapping]: the error information (None until set from the server).
@@ -704,7 +709,13 @@ def error_result(self):
704709

705710
@property
706711
def errors(self):
707-
"""Information about individual errors generated by the job.
712+
"""Output only. The first errors encountered during the running of the job.
713+
714+
The final message includes the number of errors that caused the process to stop.
715+
Errors here do not necessarily mean that the job has not completed or was unsuccessful.
716+
717+
See:
718+
https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#JobStatus.FIELDS.errors
708719
709720
Returns:
710721
Optional[List[Mapping]]:
@@ -716,7 +727,12 @@ def errors(self):
716727

717728
@property
718729
def state(self):
719-
"""Status of the job.
730+
"""Output only. Running state of the job.
731+
732+
Valid states include 'PENDING', 'RUNNING', and 'DONE'.
733+
734+
See:
735+
https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#JobStatus.FIELDS.state
720736
721737
Returns:
722738
Optional[str]:

0 commit comments

Comments
 (0)