LoadJob(job_id, source_uris, destination, client, job_config=None)
Asynchronous job for loading data into a table.
Can load from Google Cloud Storage URIs or from a file.
Parameters Inheritancebuiltins.object > google.api_core.future.base.Future > google.api_core.future.polling.PollingFuture > google.cloud.bigquery.job.base._AsyncJob > LoadJob Properties allow_jagged_rowsSee allow_jagged_rows.
allow_quoted_newlines autodetectSee autodetect.
clustering_fieldsSee clustering_fields.
create_dispositionSee create_disposition.
createdDatetime at which the job was created.
Returns Type Description Optional[datetime.datetime] the creation time (None until set from the server). destination destination_encryption_configuration destination_table_description destination_table_friendly_name encodingSee encoding.
endedDatetime at which the job finished.
Returns Type Description Optional[datetime.datetime] the end time (None until set from the server). error_resultError information about the job as a whole.
Returns Type Description Optional[Mapping] the error information (None until set from the server). errorsInformation about individual errors generated by the job.
Returns Type Description Optional[List[Mapping]] the error information (None until set from the server). etagETag for the job resource.
Returns Type Description Optional[str] the ETag (None until set from the server). field_delimiterSee field_delimiter.
ignore_unknown_values input_file_bytesCount of bytes loaded from source files.
Exceptions Type Description ValueError for invalid value types. Returns Type Description Optional[int] the count (None until set from the server). input_filesCount of source files.
Returns Type Description Optional[int] the count (None until set from the server). job_idstr: ID of the job.
job_typeType of job.
Returns Type Description str one of 'load', 'copy', 'extract', 'query'. labelsDict[str, str]: Labels for the job.
locationstr: Location where the job runs.
max_bad_recordsSee max_bad_records.
null_markerSee null_marker.
num_child_jobs output_bytesCount of bytes saved to destination table.
Returns Type Description Optional[int] the count (None until set from the server). output_rowsCount of rows saved to destination table.
Returns Type Description Optional[int] the count (None until set from the server). parent_job_id Returns Type Description Optional[str] parent job id. pathURL path for the job's APIs.
Returns Type Description str the path based on project and job ID. projectProject bound to the job.
Returns Type Description str the project (derived from the client). quote_characterSee quote_character.
range_partitioningSee range_partitioning.
reservation_usageJob resource usage breakdown by reservation.
Returns schemaSee schema.
schema_update_options script_statisticsStatistics for a child job of a script.
self_linkURL for the job resource.
Returns Type Description Optional[str] the URL (None until set from the server). session_info[Preview] Information of the session if this job is part of one.
.. versionadded:: 2.29.0
skip_leading_rowsSee skip_leading_rows.
source_formatSee source_format.
source_urisOptional[Sequence[str]]: URIs of data files to be loaded. See https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#JobConfigurationLoad.FIELDS.source_uris for supported URI formats. None for jobs that load from a file.
startedDatetime at which the job was started.
Returns Type Description Optional[datetime.datetime] the start time (None until set from the server). stateStatus of the job.
Returns Type Description Optional[str] the state (None until set from the server). time_partitioningSee time_partitioning.
transaction_infoInformation of the multi-statement transaction if this job is part of one.
Since a scripting query job can execute multiple transactions, this property is only expected on child jobs. Use the list_jobs method with the parent_job
parameter to iterate over child jobs.
.. versionadded:: 2.24.0
use_avro_logical_types user_emailE-mail address of user who submitted the job.
Returns Type Description Optional[str] the URL (None until set from the server). write_dispositionSee write_disposition.
Methods add_done_callbackAdd a callback to be executed when the operation is complete.
If the operation is not already complete, this will start a helper thread to poll for the status of the operation in the background.
Parameter Name Description fnCallable[Future]
The callback to execute when the operation is complete.
cancelcancel(client=None, retry: retries.Retry = <google.api_core.retry.Retry object>, timeout: float = None)
Parameters Name Description timeout Optional[float]
The number of seconds to wait for the underlying HTTP transport before using retry
Optional[google.cloud.bigquery.client.Client]
the client to use. If not passed, falls back to the client
stored on the current dataset.
Optional[google.api_core.retry.Retry]
How to retry the RPC.
Returns Type Description bool Boolean indicating that the cancel request was sent. cancelledCheck if the job has been cancelled.
This always returns False. It's not possible to check if a job was cancelled in the API. This method is here to satisfy the interface for google.api_core.future.Future
.
done(retry: retries.Retry = <google.api_core.retry.Retry object>, timeout: float = None, reload: bool = True)
Checks if the job is complete.
Parameters Name Description timeoutOptional[float]
The number of seconds to wait for the underlying HTTP transport before using retry
.
Optional[bool]
If True
, make an API call to refresh the job state of unfinished jobs before checking. Default True
.
Optional[google.api_core.retry.Retry]
How to retry the RPC. If the job state is DONE
, retrying is aborted early, as the job will not change anymore.
Get the exception from the operation, blocking if necessary.
Parameter Name Description timeoutint
How long to wait for the operation to complete. If None, wait indefinitely.
Returns Type Description Optional[google.api_core.GoogleAPICallError] The operation's error. existsexists(client=None, retry: retries.Retry = <google.api_core.retry.Retry object>, timeout: float = None)
Parameters Name Description timeout Optional[float]
The number of seconds to wait for the underlying HTTP transport before using retry
.
Optional[google.cloud.bigquery.client.Client]
the client to use. If not passed, falls back to the client
stored on the current dataset.
Optional[google.api_core.retry.Retry]
How to retry the RPC.
Returns Type Description bool Boolean indicating existence of the job. from_api_reprfrom_api_repr(resource: dict, client)
Factory: construct a job given its API representation
Note: This method assumes that the project found in the resource matches the client's project. Parameters Name Description resourceDict
dataset job representation returned from the API
clientgoogle.cloud.bigquery.client.Client
Client which holds credentials and project configuration for the dataset.
Returns Type Description google.cloud.bigquery.job.LoadJob Job parsed from ``resource``. reloadreload(client=None, retry: retries.Retry = <google.api_core.retry.Retry object>, timeout: float = None)
Parameters Name Description timeout Optional[float]
The number of seconds to wait for the underlying HTTP transport before using retry
.
Optional[google.cloud.bigquery.client.Client]
the client to use. If not passed, falls back to the client
stored on the current dataset.
Optional[google.api_core.retry.Retry]
How to retry the RPC.
resultresult(retry: retries.Retry = <google.api_core.retry.Retry object>, timeout: float = None)
Start the job and wait for it to complete and get the result.
Parameters Name Description timeoutOptional[float]
The number of seconds to wait for the underlying HTTP transport before using retry
. If multiple requests are made under the hood, timeout
applies to each individual request.
Optional[google.api_core.retry.Retry]
How to retry the RPC. If the job state is DONE
, retrying is aborted early, as the job will not change anymore.
True if the operation is currently running.
set_exceptionSet the Future's exception.
set_resultSet the Future's result.
to_api_reprGenerate a resource for _begin
.
__init__(job_id, source_uris, destination, client, job_config=None)
Initialize self. See help(type(self)) for accurate signature.
LoadJobLoadJob(job_id, source_uris, destination, client, job_config=None)
Asynchronous job for loading data into a table.
Can load from Google Cloud Storage URIs or from a file.
ParametersRetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4