partition
stringclasses
3 values
func_name
stringlengths
1
134
docstring
stringlengths
1
46.9k
path
stringlengths
4
223
original_string
stringlengths
75
104k
code
stringlengths
75
104k
docstring_tokens
listlengths
1
1.97k
repo
stringlengths
7
55
language
stringclasses
1 value
url
stringlengths
87
315
code_tokens
listlengths
19
28.4k
sha
stringlengths
40
40
train
_ClientFactoryMixin.from_service_account_json
Factory to retrieve JSON credentials while creating client. :type json_credentials_path: str :param json_credentials_path: The path to a private key file (this file was given to you when you created the service account). This f...
core/google/cloud/client.py
def from_service_account_json(cls, json_credentials_path, *args, **kwargs): """Factory to retrieve JSON credentials while creating client. :type json_credentials_path: str :param json_credentials_path: The path to a private key file (this file was given to ...
def from_service_account_json(cls, json_credentials_path, *args, **kwargs): """Factory to retrieve JSON credentials while creating client. :type json_credentials_path: str :param json_credentials_path: The path to a private key file (this file was given to ...
[ "Factory", "to", "retrieve", "JSON", "credentials", "while", "creating", "client", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/core/google/cloud/client.py#L48-L82
[ "def", "from_service_account_json", "(", "cls", ",", "json_credentials_path", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "\"credentials\"", "in", "kwargs", ":", "raise", "TypeError", "(", "\"credentials must not be in keyword arguments\"", ")", "with...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Client._http
Getter for object used for HTTP transport. :rtype: :class:`~requests.Session` :returns: An HTTP object.
core/google/cloud/client.py
def _http(self): """Getter for object used for HTTP transport. :rtype: :class:`~requests.Session` :returns: An HTTP object. """ if self._http_internal is None: self._http_internal = google.auth.transport.requests.AuthorizedSession( self._credentials ...
def _http(self): """Getter for object used for HTTP transport. :rtype: :class:`~requests.Session` :returns: An HTTP object. """ if self._http_internal is None: self._http_internal = google.auth.transport.requests.AuthorizedSession( self._credentials ...
[ "Getter", "for", "object", "used", "for", "HTTP", "transport", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/core/google/cloud/client.py#L148-L158
[ "def", "_http", "(", "self", ")", ":", "if", "self", ".", "_http_internal", "is", "None", ":", "self", ".", "_http_internal", "=", "google", ".", "auth", ".", "transport", ".", "requests", ".", "AuthorizedSession", "(", "self", ".", "_credentials", ")", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
AlertPolicyServiceClient.alert_policy_path
Return a fully-qualified alert_policy string.
monitoring/google/cloud/monitoring_v3/gapic/alert_policy_service_client.py
def alert_policy_path(cls, project, alert_policy): """Return a fully-qualified alert_policy string.""" return google.api_core.path_template.expand( "projects/{project}/alertPolicies/{alert_policy}", project=project, alert_policy=alert_policy, )
def alert_policy_path(cls, project, alert_policy): """Return a fully-qualified alert_policy string.""" return google.api_core.path_template.expand( "projects/{project}/alertPolicies/{alert_policy}", project=project, alert_policy=alert_policy, )
[ "Return", "a", "fully", "-", "qualified", "alert_policy", "string", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/monitoring/google/cloud/monitoring_v3/gapic/alert_policy_service_client.py#L96-L102
[ "def", "alert_policy_path", "(", "cls", ",", "project", ",", "alert_policy", ")", ":", "return", "google", ".", "api_core", ".", "path_template", ".", "expand", "(", "\"projects/{project}/alertPolicies/{alert_policy}\"", ",", "project", "=", "project", ",", "alert_p...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
AlertPolicyServiceClient.alert_policy_condition_path
Return a fully-qualified alert_policy_condition string.
monitoring/google/cloud/monitoring_v3/gapic/alert_policy_service_client.py
def alert_policy_condition_path(cls, project, alert_policy, condition): """Return a fully-qualified alert_policy_condition string.""" return google.api_core.path_template.expand( "projects/{project}/alertPolicies/{alert_policy}/conditions/{condition}", project=project, ...
def alert_policy_condition_path(cls, project, alert_policy, condition): """Return a fully-qualified alert_policy_condition string.""" return google.api_core.path_template.expand( "projects/{project}/alertPolicies/{alert_policy}/conditions/{condition}", project=project, ...
[ "Return", "a", "fully", "-", "qualified", "alert_policy_condition", "string", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/monitoring/google/cloud/monitoring_v3/gapic/alert_policy_service_client.py#L105-L112
[ "def", "alert_policy_condition_path", "(", "cls", ",", "project", ",", "alert_policy", ",", "condition", ")", ":", "return", "google", ".", "api_core", ".", "path_template", ".", "expand", "(", "\"projects/{project}/alertPolicies/{alert_policy}/conditions/{condition}\"", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_get_many
Get multiple items from a Queue. Gets at least one (blocking) and at most ``max_items`` items (non-blocking) from a given Queue. Does not mark the items as done. Args: queue_ (~queue.Queue`): The Queue to get items from. max_items (int): The maximum number of items to get. If ``None``, the...
pubsub/google/cloud/pubsub_v1/subscriber/_protocol/helper_threads.py
def _get_many(queue_, max_items=None, max_latency=0): """Get multiple items from a Queue. Gets at least one (blocking) and at most ``max_items`` items (non-blocking) from a given Queue. Does not mark the items as done. Args: queue_ (~queue.Queue`): The Queue to get items from. max_item...
def _get_many(queue_, max_items=None, max_latency=0): """Get multiple items from a Queue. Gets at least one (blocking) and at most ``max_items`` items (non-blocking) from a given Queue. Does not mark the items as done. Args: queue_ (~queue.Queue`): The Queue to get items from. max_item...
[ "Get", "multiple", "items", "from", "a", "Queue", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/pubsub/google/cloud/pubsub_v1/subscriber/_protocol/helper_threads.py#L34-L61
[ "def", "_get_many", "(", "queue_", ",", "max_items", "=", "None", ",", "max_latency", "=", "0", ")", ":", "start", "=", "time", ".", "time", "(", ")", "# Always return at least one item.", "items", "=", "[", "queue_", ".", "get", "(", ")", "]", "while", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_error_result_to_exception
Maps BigQuery error reasons to an exception. The reasons and their matching HTTP status codes are documented on the `troubleshooting errors`_ page. .. _troubleshooting errors: https://cloud.google.com/bigquery\ /troubleshooting-errors :type error_result: Mapping[str, str] :param error_res...
bigquery/google/cloud/bigquery/job.py
def _error_result_to_exception(error_result): """Maps BigQuery error reasons to an exception. The reasons and their matching HTTP status codes are documented on the `troubleshooting errors`_ page. .. _troubleshooting errors: https://cloud.google.com/bigquery\ /troubleshooting-errors :type...
def _error_result_to_exception(error_result): """Maps BigQuery error reasons to an exception. The reasons and their matching HTTP status codes are documented on the `troubleshooting errors`_ page. .. _troubleshooting errors: https://cloud.google.com/bigquery\ /troubleshooting-errors :type...
[ "Maps", "BigQuery", "error", "reasons", "to", "an", "exception", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L71-L92
[ "def", "_error_result_to_exception", "(", "error_result", ")", ":", "reason", "=", "error_result", ".", "get", "(", "\"reason\"", ")", "status_code", "=", "_ERROR_REASON_TO_EXCEPTION", ".", "get", "(", "reason", ",", "http_client", ".", "INTERNAL_SERVER_ERROR", ")",...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_JobReference._from_api_repr
Returns a job reference for an API resource representation.
bigquery/google/cloud/bigquery/job.py
def _from_api_repr(cls, resource): """Returns a job reference for an API resource representation.""" job_id = resource.get("jobId") project = resource.get("projectId") location = resource.get("location") job_ref = cls(job_id, project, location) return job_ref
def _from_api_repr(cls, resource): """Returns a job reference for an API resource representation.""" job_id = resource.get("jobId") project = resource.get("projectId") location = resource.get("location") job_ref = cls(job_id, project, location) return job_ref
[ "Returns", "a", "job", "reference", "for", "an", "API", "resource", "representation", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L269-L275
[ "def", "_from_api_repr", "(", "cls", ",", "resource", ")", ":", "job_id", "=", "resource", ".", "get", "(", "\"jobId\"", ")", "project", "=", "resource", ".", "get", "(", "\"projectId\"", ")", "location", "=", "resource", ".", "get", "(", "\"location\"", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_AsyncJob.created
Datetime at which the job was created. :rtype: ``datetime.datetime``, or ``NoneType`` :returns: the creation time (None until set from the server).
bigquery/google/cloud/bigquery/job.py
def created(self): """Datetime at which the job was created. :rtype: ``datetime.datetime``, or ``NoneType`` :returns: the creation time (None until set from the server). """ statistics = self._properties.get("statistics") if statistics is not None: millis = s...
def created(self): """Datetime at which the job was created. :rtype: ``datetime.datetime``, or ``NoneType`` :returns: the creation time (None until set from the server). """ statistics = self._properties.get("statistics") if statistics is not None: millis = s...
[ "Datetime", "at", "which", "the", "job", "was", "created", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L389-L399
[ "def", "created", "(", "self", ")", ":", "statistics", "=", "self", ".", "_properties", ".", "get", "(", "\"statistics\"", ")", "if", "statistics", "is", "not", "None", ":", "millis", "=", "statistics", ".", "get", "(", "\"creationTime\"", ")", "if", "mi...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_AsyncJob.started
Datetime at which the job was started. :rtype: ``datetime.datetime``, or ``NoneType`` :returns: the start time (None until set from the server).
bigquery/google/cloud/bigquery/job.py
def started(self): """Datetime at which the job was started. :rtype: ``datetime.datetime``, or ``NoneType`` :returns: the start time (None until set from the server). """ statistics = self._properties.get("statistics") if statistics is not None: millis = stat...
def started(self): """Datetime at which the job was started. :rtype: ``datetime.datetime``, or ``NoneType`` :returns: the start time (None until set from the server). """ statistics = self._properties.get("statistics") if statistics is not None: millis = stat...
[ "Datetime", "at", "which", "the", "job", "was", "started", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L402-L412
[ "def", "started", "(", "self", ")", ":", "statistics", "=", "self", ".", "_properties", ".", "get", "(", "\"statistics\"", ")", "if", "statistics", "is", "not", "None", ":", "millis", "=", "statistics", ".", "get", "(", "\"startTime\"", ")", "if", "milli...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_AsyncJob.ended
Datetime at which the job finished. :rtype: ``datetime.datetime``, or ``NoneType`` :returns: the end time (None until set from the server).
bigquery/google/cloud/bigquery/job.py
def ended(self): """Datetime at which the job finished. :rtype: ``datetime.datetime``, or ``NoneType`` :returns: the end time (None until set from the server). """ statistics = self._properties.get("statistics") if statistics is not None: millis = statistics....
def ended(self): """Datetime at which the job finished. :rtype: ``datetime.datetime``, or ``NoneType`` :returns: the end time (None until set from the server). """ statistics = self._properties.get("statistics") if statistics is not None: millis = statistics....
[ "Datetime", "at", "which", "the", "job", "finished", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L415-L425
[ "def", "ended", "(", "self", ")", ":", "statistics", "=", "self", ".", "_properties", ".", "get", "(", "\"statistics\"", ")", "if", "statistics", "is", "not", "None", ":", "millis", "=", "statistics", ".", "get", "(", "\"endTime\"", ")", "if", "millis", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_AsyncJob._job_statistics
Helper for job-type specific statistics-based properties.
bigquery/google/cloud/bigquery/job.py
def _job_statistics(self): """Helper for job-type specific statistics-based properties.""" statistics = self._properties.get("statistics", {}) return statistics.get(self._JOB_TYPE, {})
def _job_statistics(self): """Helper for job-type specific statistics-based properties.""" statistics = self._properties.get("statistics", {}) return statistics.get(self._JOB_TYPE, {})
[ "Helper", "for", "job", "-", "type", "specific", "statistics", "-", "based", "properties", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L427-L430
[ "def", "_job_statistics", "(", "self", ")", ":", "statistics", "=", "self", ".", "_properties", ".", "get", "(", "\"statistics\"", ",", "{", "}", ")", "return", "statistics", ".", "get", "(", "self", ".", "_JOB_TYPE", ",", "{", "}", ")" ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_AsyncJob._set_properties
Update properties from resource in body of ``api_response`` :type api_response: dict :param api_response: response returned from an API call
bigquery/google/cloud/bigquery/job.py
def _set_properties(self, api_response): """Update properties from resource in body of ``api_response`` :type api_response: dict :param api_response: response returned from an API call """ cleaned = api_response.copy() self._scrub_local_properties(cleaned) stati...
def _set_properties(self, api_response): """Update properties from resource in body of ``api_response`` :type api_response: dict :param api_response: response returned from an API call """ cleaned = api_response.copy() self._scrub_local_properties(cleaned) stati...
[ "Update", "properties", "from", "resource", "in", "body", "of", "api_response" ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L473-L495
[ "def", "_set_properties", "(", "self", ",", "api_response", ")", ":", "cleaned", "=", "api_response", ".", "copy", "(", ")", "self", ".", "_scrub_local_properties", "(", "cleaned", ")", "statistics", "=", "cleaned", ".", "get", "(", "\"statistics\"", ",", "{...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_AsyncJob._get_resource_config
Helper for :meth:`from_api_repr` :type resource: dict :param resource: resource for the job :rtype: dict :returns: tuple (string, dict), where the first element is the job ID and the second contains job-specific configuration. :raises: :class:`KeyError` if the...
bigquery/google/cloud/bigquery/job.py
def _get_resource_config(cls, resource): """Helper for :meth:`from_api_repr` :type resource: dict :param resource: resource for the job :rtype: dict :returns: tuple (string, dict), where the first element is the job ID and the second contains job-specific conf...
def _get_resource_config(cls, resource): """Helper for :meth:`from_api_repr` :type resource: dict :param resource: resource for the job :rtype: dict :returns: tuple (string, dict), where the first element is the job ID and the second contains job-specific conf...
[ "Helper", "for", ":", "meth", ":", "from_api_repr" ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L498-L524
[ "def", "_get_resource_config", "(", "cls", ",", "resource", ")", ":", "if", "\"jobReference\"", "not", "in", "resource", "or", "\"jobId\"", "not", "in", "resource", "[", "\"jobReference\"", "]", ":", "raise", "KeyError", "(", "\"Resource lacks required identity info...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_AsyncJob._begin
API call: begin the job via a POST request See https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/insert :type client: :class:`~google.cloud.bigquery.client.Client` or ``NoneType`` :param client: the client to use. If not passed, falls back to the ...
bigquery/google/cloud/bigquery/job.py
def _begin(self, client=None, retry=DEFAULT_RETRY): """API call: begin the job via a POST request See https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/insert :type client: :class:`~google.cloud.bigquery.client.Client` or ``NoneType`` :param c...
def _begin(self, client=None, retry=DEFAULT_RETRY): """API call: begin the job via a POST request See https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/insert :type client: :class:`~google.cloud.bigquery.client.Client` or ``NoneType`` :param c...
[ "API", "call", ":", "begin", "the", "job", "via", "a", "POST", "request" ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L532-L559
[ "def", "_begin", "(", "self", ",", "client", "=", "None", ",", "retry", "=", "DEFAULT_RETRY", ")", ":", "if", "self", ".", "state", "is", "not", "None", ":", "raise", "ValueError", "(", "\"Job already begun.\"", ")", "client", "=", "self", ".", "_require...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_AsyncJob.exists
API call: test for the existence of the job via a GET request See https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/get :type client: :class:`~google.cloud.bigquery.client.Client` or ``NoneType`` :param client: the client to use. If not passed, falls...
bigquery/google/cloud/bigquery/job.py
def exists(self, client=None, retry=DEFAULT_RETRY): """API call: test for the existence of the job via a GET request See https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/get :type client: :class:`~google.cloud.bigquery.client.Client` or ``NoneType`` ...
def exists(self, client=None, retry=DEFAULT_RETRY): """API call: test for the existence of the job via a GET request See https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/get :type client: :class:`~google.cloud.bigquery.client.Client` or ``NoneType`` ...
[ "API", "call", ":", "test", "for", "the", "existence", "of", "the", "job", "via", "a", "GET", "request" ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L561-L591
[ "def", "exists", "(", "self", ",", "client", "=", "None", ",", "retry", "=", "DEFAULT_RETRY", ")", ":", "client", "=", "self", ".", "_require_client", "(", "client", ")", "extra_params", "=", "{", "\"fields\"", ":", "\"id\"", "}", "if", "self", ".", "l...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_AsyncJob.reload
API call: refresh job properties via a GET request. See https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/get :type client: :class:`~google.cloud.bigquery.client.Client` or ``NoneType`` :param client: the client to use. If not passed, falls back to t...
bigquery/google/cloud/bigquery/job.py
def reload(self, client=None, retry=DEFAULT_RETRY): """API call: refresh job properties via a GET request. See https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/get :type client: :class:`~google.cloud.bigquery.client.Client` or ``NoneType`` :p...
def reload(self, client=None, retry=DEFAULT_RETRY): """API call: refresh job properties via a GET request. See https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/get :type client: :class:`~google.cloud.bigquery.client.Client` or ``NoneType`` :p...
[ "API", "call", ":", "refresh", "job", "properties", "via", "a", "GET", "request", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L593-L616
[ "def", "reload", "(", "self", ",", "client", "=", "None", ",", "retry", "=", "DEFAULT_RETRY", ")", ":", "client", "=", "self", ".", "_require_client", "(", "client", ")", "extra_params", "=", "{", "}", "if", "self", ".", "location", ":", "extra_params", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_AsyncJob.cancel
API call: cancel job via a POST request See https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/cancel :type client: :class:`~google.cloud.bigquery.client.Client` or ``NoneType`` :param client: the client to use. If not passed, falls back to the ...
bigquery/google/cloud/bigquery/job.py
def cancel(self, client=None): """API call: cancel job via a POST request See https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/cancel :type client: :class:`~google.cloud.bigquery.client.Client` or ``NoneType`` :param client: the client to use...
def cancel(self, client=None): """API call: cancel job via a POST request See https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/cancel :type client: :class:`~google.cloud.bigquery.client.Client` or ``NoneType`` :param client: the client to use...
[ "API", "call", ":", "cancel", "job", "via", "a", "POST", "request" ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L618-L644
[ "def", "cancel", "(", "self", ",", "client", "=", "None", ")", ":", "client", "=", "self", ".", "_require_client", "(", "client", ")", "extra_params", "=", "{", "}", "if", "self", ".", "location", ":", "extra_params", "[", "\"location\"", "]", "=", "se...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_AsyncJob._set_future_result
Set the result or exception from the job if it is complete.
bigquery/google/cloud/bigquery/job.py
def _set_future_result(self): """Set the result or exception from the job if it is complete.""" # This must be done in a lock to prevent the polling thread # and main thread from both executing the completion logic # at the same time. with self._completion_lock: # If ...
def _set_future_result(self): """Set the result or exception from the job if it is complete.""" # This must be done in a lock to prevent the polling thread # and main thread from both executing the completion logic # at the same time. with self._completion_lock: # If ...
[ "Set", "the", "result", "or", "exception", "from", "the", "job", "if", "it", "is", "complete", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L651-L668
[ "def", "_set_future_result", "(", "self", ")", ":", "# This must be done in a lock to prevent the polling thread", "# and main thread from both executing the completion logic", "# at the same time.", "with", "self", ".", "_completion_lock", ":", "# If the operation isn't complete or if t...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_AsyncJob.done
Refresh the job and checks if it is complete. :type retry: :class:`google.api_core.retry.Retry` :param retry: (Optional) How to retry the RPC. :rtype: bool :returns: True if the job is complete, False otherwise.
bigquery/google/cloud/bigquery/job.py
def done(self, retry=DEFAULT_RETRY): """Refresh the job and checks if it is complete. :type retry: :class:`google.api_core.retry.Retry` :param retry: (Optional) How to retry the RPC. :rtype: bool :returns: True if the job is complete, False otherwise. """ # Do n...
def done(self, retry=DEFAULT_RETRY): """Refresh the job and checks if it is complete. :type retry: :class:`google.api_core.retry.Retry` :param retry: (Optional) How to retry the RPC. :rtype: bool :returns: True if the job is complete, False otherwise. """ # Do n...
[ "Refresh", "the", "job", "and", "checks", "if", "it", "is", "complete", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L670-L683
[ "def", "done", "(", "self", ",", "retry", "=", "DEFAULT_RETRY", ")", ":", "# Do not refresh is the state is already done, as the job will not", "# change once complete.", "if", "self", ".", "state", "!=", "_DONE_STATE", ":", "self", ".", "reload", "(", "retry", "=", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_AsyncJob.result
Start the job and wait for it to complete and get the result. :type timeout: float :param timeout: How long (in seconds) to wait for job to complete before raising a :class:`concurrent.futures.TimeoutError`. :type retry: :class:`google.api_core.retry.Retry` :par...
bigquery/google/cloud/bigquery/job.py
def result(self, timeout=None, retry=DEFAULT_RETRY): """Start the job and wait for it to complete and get the result. :type timeout: float :param timeout: How long (in seconds) to wait for job to complete before raising a :class:`concurrent.futures.TimeoutError`. ...
def result(self, timeout=None, retry=DEFAULT_RETRY): """Start the job and wait for it to complete and get the result. :type timeout: float :param timeout: How long (in seconds) to wait for job to complete before raising a :class:`concurrent.futures.TimeoutError`. ...
[ "Start", "the", "job", "and", "wait", "for", "it", "to", "complete", "and", "get", "the", "result", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L685-L707
[ "def", "result", "(", "self", ",", "timeout", "=", "None", ",", "retry", "=", "DEFAULT_RETRY", ")", ":", "if", "self", ".", "state", "is", "None", ":", "self", ".", "_begin", "(", "retry", "=", "retry", ")", "# TODO: modify PollingFuture so it can pass a ret...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_JobConfig._get_sub_prop
Get a value in the ``self._properties[self._job_type]`` dictionary. Most job properties are inside the dictionary related to the job type (e.g. 'copy', 'extract', 'load', 'query'). Use this method to access those properties:: self._get_sub_prop('destinationTable') This is ...
bigquery/google/cloud/bigquery/job.py
def _get_sub_prop(self, key, default=None): """Get a value in the ``self._properties[self._job_type]`` dictionary. Most job properties are inside the dictionary related to the job type (e.g. 'copy', 'extract', 'load', 'query'). Use this method to access those properties:: s...
def _get_sub_prop(self, key, default=None): """Get a value in the ``self._properties[self._job_type]`` dictionary. Most job properties are inside the dictionary related to the job type (e.g. 'copy', 'extract', 'load', 'query'). Use this method to access those properties:: s...
[ "Get", "a", "value", "in", "the", "self", ".", "_properties", "[", "self", ".", "_job_type", "]", "dictionary", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L757-L784
[ "def", "_get_sub_prop", "(", "self", ",", "key", ",", "default", "=", "None", ")", ":", "return", "_helpers", ".", "_get_sub_prop", "(", "self", ".", "_properties", ",", "[", "self", ".", "_job_type", ",", "key", "]", ",", "default", "=", "default", ")...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_JobConfig._set_sub_prop
Set a value in the ``self._properties[self._job_type]`` dictionary. Most job properties are inside the dictionary related to the job type (e.g. 'copy', 'extract', 'load', 'query'). Use this method to set those properties:: self._set_sub_prop('useLegacySql', False) This is ...
bigquery/google/cloud/bigquery/job.py
def _set_sub_prop(self, key, value): """Set a value in the ``self._properties[self._job_type]`` dictionary. Most job properties are inside the dictionary related to the job type (e.g. 'copy', 'extract', 'load', 'query'). Use this method to set those properties:: self._set_s...
def _set_sub_prop(self, key, value): """Set a value in the ``self._properties[self._job_type]`` dictionary. Most job properties are inside the dictionary related to the job type (e.g. 'copy', 'extract', 'load', 'query'). Use this method to set those properties:: self._set_s...
[ "Set", "a", "value", "in", "the", "self", ".", "_properties", "[", "self", ".", "_job_type", "]", "dictionary", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L786-L806
[ "def", "_set_sub_prop", "(", "self", ",", "key", ",", "value", ")", ":", "_helpers", ".", "_set_sub_prop", "(", "self", ".", "_properties", ",", "[", "self", ".", "_job_type", ",", "key", "]", ",", "value", ")" ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_JobConfig._del_sub_prop
Remove ``key`` from the ``self._properties[self._job_type]`` dict. Most job properties are inside the dictionary related to the job type (e.g. 'copy', 'extract', 'load', 'query'). Use this method to clear those properties:: self._del_sub_prop('useLegacySql') This is equiva...
bigquery/google/cloud/bigquery/job.py
def _del_sub_prop(self, key): """Remove ``key`` from the ``self._properties[self._job_type]`` dict. Most job properties are inside the dictionary related to the job type (e.g. 'copy', 'extract', 'load', 'query'). Use this method to clear those properties:: self._del_sub_pro...
def _del_sub_prop(self, key): """Remove ``key`` from the ``self._properties[self._job_type]`` dict. Most job properties are inside the dictionary related to the job type (e.g. 'copy', 'extract', 'load', 'query'). Use this method to clear those properties:: self._del_sub_pro...
[ "Remove", "key", "from", "the", "self", ".", "_properties", "[", "self", ".", "_job_type", "]", "dict", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L808-L827
[ "def", "_del_sub_prop", "(", "self", ",", "key", ")", ":", "_helpers", ".", "_del_sub_prop", "(", "self", ".", "_properties", ",", "[", "self", ".", "_job_type", ",", "key", "]", ")" ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_JobConfig._fill_from_default
Merge this job config with a default job config. The keys in this object take precedence over the keys in the default config. The merge is done at the top-level as well as for keys one level below the job type. Arguments: default_job_config (google.cloud.bigquery.job._JobCo...
bigquery/google/cloud/bigquery/job.py
def _fill_from_default(self, default_job_config): """Merge this job config with a default job config. The keys in this object take precedence over the keys in the default config. The merge is done at the top-level as well as for keys one level below the job type. Arguments: ...
def _fill_from_default(self, default_job_config): """Merge this job config with a default job config. The keys in this object take precedence over the keys in the default config. The merge is done at the top-level as well as for keys one level below the job type. Arguments: ...
[ "Merge", "this", "job", "config", "with", "a", "default", "job", "config", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L837-L869
[ "def", "_fill_from_default", "(", "self", ",", "default_job_config", ")", ":", "if", "self", ".", "_job_type", "!=", "default_job_config", ".", "_job_type", ":", "raise", "TypeError", "(", "\"attempted to merge two incompatible job types: \"", "+", "repr", "(", "self"...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_JobConfig.from_api_repr
Factory: construct a job configuration given its API representation :type resource: dict :param resource: An extract job configuration in the same representation as is returned from the API. :rtype: :class:`google.cloud.bigquery.job._JobConfig` :returns: Configu...
bigquery/google/cloud/bigquery/job.py
def from_api_repr(cls, resource): """Factory: construct a job configuration given its API representation :type resource: dict :param resource: An extract job configuration in the same representation as is returned from the API. :rtype: :class:`google.cloud.bigqu...
def from_api_repr(cls, resource): """Factory: construct a job configuration given its API representation :type resource: dict :param resource: An extract job configuration in the same representation as is returned from the API. :rtype: :class:`google.cloud.bigqu...
[ "Factory", ":", "construct", "a", "job", "configuration", "given", "its", "API", "representation" ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L872-L885
[ "def", "from_api_repr", "(", "cls", ",", "resource", ")", ":", "config", "=", "cls", "(", ")", "config", ".", "_properties", "=", "copy", ".", "deepcopy", "(", "resource", ")", "return", "config" ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
LoadJobConfig.destination_encryption_configuration
google.cloud.bigquery.table.EncryptionConfiguration: Custom encryption configuration for the destination table. Custom encryption configuration (e.g., Cloud KMS keys) or :data:`None` if using default encryption. See https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#...
bigquery/google/cloud/bigquery/job.py
def destination_encryption_configuration(self): """google.cloud.bigquery.table.EncryptionConfiguration: Custom encryption configuration for the destination table. Custom encryption configuration (e.g., Cloud KMS keys) or :data:`None` if using default encryption. See htt...
def destination_encryption_configuration(self): """google.cloud.bigquery.table.EncryptionConfiguration: Custom encryption configuration for the destination table. Custom encryption configuration (e.g., Cloud KMS keys) or :data:`None` if using default encryption. See htt...
[ "google", ".", "cloud", ".", "bigquery", ".", "table", ".", "EncryptionConfiguration", ":", "Custom", "encryption", "configuration", "for", "the", "destination", "table", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L981-L994
[ "def", "destination_encryption_configuration", "(", "self", ")", ":", "prop", "=", "self", ".", "_get_sub_prop", "(", "\"destinationEncryptionConfiguration\"", ")", "if", "prop", "is", "not", "None", ":", "prop", "=", "EncryptionConfiguration", ".", "from_api_repr", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
LoadJobConfig.schema
List[google.cloud.bigquery.schema.SchemaField]: Schema of the destination table. See https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#configuration.load.schema
bigquery/google/cloud/bigquery/job.py
def schema(self): """List[google.cloud.bigquery.schema.SchemaField]: Schema of the destination table. See https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#configuration.load.schema """ schema = _helpers._get_sub_prop(self._properties, ["load", "schema", "fie...
def schema(self): """List[google.cloud.bigquery.schema.SchemaField]: Schema of the destination table. See https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#configuration.load.schema """ schema = _helpers._get_sub_prop(self._properties, ["load", "schema", "fie...
[ "List", "[", "google", ".", "cloud", ".", "bigquery", ".", "schema", ".", "SchemaField", "]", ":", "Schema", "of", "the", "destination", "table", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L1123-L1133
[ "def", "schema", "(", "self", ")", ":", "schema", "=", "_helpers", ".", "_get_sub_prop", "(", "self", ".", "_properties", ",", "[", "\"load\"", ",", "\"schema\"", ",", "\"fields\"", "]", ")", "if", "schema", "is", "None", ":", "return", "return", "[", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
LoadJobConfig.time_partitioning
google.cloud.bigquery.table.TimePartitioning: Specifies time-based partitioning for the destination table.
bigquery/google/cloud/bigquery/job.py
def time_partitioning(self): """google.cloud.bigquery.table.TimePartitioning: Specifies time-based partitioning for the destination table. """ prop = self._get_sub_prop("timePartitioning") if prop is not None: prop = TimePartitioning.from_api_repr(prop) return...
def time_partitioning(self): """google.cloud.bigquery.table.TimePartitioning: Specifies time-based partitioning for the destination table. """ prop = self._get_sub_prop("timePartitioning") if prop is not None: prop = TimePartitioning.from_api_repr(prop) return...
[ "google", ".", "cloud", ".", "bigquery", ".", "table", ".", "TimePartitioning", ":", "Specifies", "time", "-", "based", "partitioning", "for", "the", "destination", "table", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L1184-L1191
[ "def", "time_partitioning", "(", "self", ")", ":", "prop", "=", "self", ".", "_get_sub_prop", "(", "\"timePartitioning\"", ")", "if", "prop", "is", "not", "None", ":", "prop", "=", "TimePartitioning", ".", "from_api_repr", "(", "prop", ")", "return", "prop" ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
LoadJob.to_api_repr
Generate a resource for :meth:`_begin`.
bigquery/google/cloud/bigquery/job.py
def to_api_repr(self): """Generate a resource for :meth:`_begin`.""" configuration = self._configuration.to_api_repr() if self.source_uris is not None: _helpers._set_sub_prop( configuration, ["load", "sourceUris"], self.source_uris ) _helpers._set_...
def to_api_repr(self): """Generate a resource for :meth:`_begin`.""" configuration = self._configuration.to_api_repr() if self.source_uris is not None: _helpers._set_sub_prop( configuration, ["load", "sourceUris"], self.source_uris ) _helpers._set_...
[ "Generate", "a", "resource", "for", ":", "meth", ":", "_begin", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L1482-L1496
[ "def", "to_api_repr", "(", "self", ")", ":", "configuration", "=", "self", ".", "_configuration", ".", "to_api_repr", "(", ")", "if", "self", ".", "source_uris", "is", "not", "None", ":", "_helpers", ".", "_set_sub_prop", "(", "configuration", ",", "[", "\...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
LoadJob.from_api_repr
Factory: construct a job given its API representation .. note: This method assumes that the project found in the resource matches the client's project. :type resource: dict :param resource: dataset job representation returned from the API :type client: :class:`...
bigquery/google/cloud/bigquery/job.py
def from_api_repr(cls, resource, 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. :type resource: dict :param resource: dataset job representation ...
def from_api_repr(cls, resource, 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. :type resource: dict :param resource: dataset job representation ...
[ "Factory", ":", "construct", "a", "job", "given", "its", "API", "representation" ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L1503-L1532
[ "def", "from_api_repr", "(", "cls", ",", "resource", ",", "client", ")", ":", "config_resource", "=", "resource", ".", "get", "(", "\"configuration\"", ",", "{", "}", ")", "config", "=", "LoadJobConfig", ".", "from_api_repr", "(", "config_resource", ")", "# ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
CopyJob.to_api_repr
Generate a resource for :meth:`_begin`.
bigquery/google/cloud/bigquery/job.py
def to_api_repr(self): """Generate a resource for :meth:`_begin`.""" source_refs = [ { "projectId": table.project, "datasetId": table.dataset_id, "tableId": table.table_id, } for table in self.sources ] ...
def to_api_repr(self): """Generate a resource for :meth:`_begin`.""" source_refs = [ { "projectId": table.project, "datasetId": table.dataset_id, "tableId": table.table_id, } for table in self.sources ] ...
[ "Generate", "a", "resource", "for", ":", "meth", ":", "_begin", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L1658-L1685
[ "def", "to_api_repr", "(", "self", ")", ":", "source_refs", "=", "[", "{", "\"projectId\"", ":", "table", ".", "project", ",", "\"datasetId\"", ":", "table", ".", "dataset_id", ",", "\"tableId\"", ":", "table", ".", "table_id", ",", "}", "for", "table", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
CopyJob.from_api_repr
Factory: construct a job given its API representation .. note: This method assumes that the project found in the resource matches the client's project. :type resource: dict :param resource: dataset job representation returned from the API :type client: :class:`...
bigquery/google/cloud/bigquery/job.py
def from_api_repr(cls, resource, 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. :type resource: dict :param resource: dataset job representation ...
def from_api_repr(cls, resource, 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. :type resource: dict :param resource: dataset job representation ...
[ "Factory", ":", "construct", "a", "job", "given", "its", "API", "representation" ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L1692-L1727
[ "def", "from_api_repr", "(", "cls", ",", "resource", ",", "client", ")", ":", "job_id", ",", "config_resource", "=", "cls", ".", "_get_resource_config", "(", "resource", ")", "config", "=", "CopyJobConfig", ".", "from_api_repr", "(", "config_resource", ")", "#...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
ExtractJob.destination_uri_file_counts
Return file counts from job statistics, if present. See: https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#statistics.extract.destinationUriFileCounts Returns: a list of integer counts, each representing the number of files per destination URI or URI pattern...
bigquery/google/cloud/bigquery/job.py
def destination_uri_file_counts(self): """Return file counts from job statistics, if present. See: https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#statistics.extract.destinationUriFileCounts Returns: a list of integer counts, each representing the number of fi...
def destination_uri_file_counts(self): """Return file counts from job statistics, if present. See: https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#statistics.extract.destinationUriFileCounts Returns: a list of integer counts, each representing the number of fi...
[ "Return", "file", "counts", "from", "job", "statistics", "if", "present", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L1859-L1875
[ "def", "destination_uri_file_counts", "(", "self", ")", ":", "counts", "=", "self", ".", "_job_statistics", "(", ")", ".", "get", "(", "\"destinationUriFileCounts\"", ")", "if", "counts", "is", "not", "None", ":", "return", "[", "int", "(", "count", ")", "...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
ExtractJob.to_api_repr
Generate a resource for :meth:`_begin`.
bigquery/google/cloud/bigquery/job.py
def to_api_repr(self): """Generate a resource for :meth:`_begin`.""" source_ref = { "projectId": self.source.project, "datasetId": self.source.dataset_id, "tableId": self.source.table_id, } configuration = self._configuration.to_api_repr() _h...
def to_api_repr(self): """Generate a resource for :meth:`_begin`.""" source_ref = { "projectId": self.source.project, "datasetId": self.source.dataset_id, "tableId": self.source.table_id, } configuration = self._configuration.to_api_repr() _h...
[ "Generate", "a", "resource", "for", ":", "meth", ":", "_begin", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L1877-L1895
[ "def", "to_api_repr", "(", "self", ")", ":", "source_ref", "=", "{", "\"projectId\"", ":", "self", ".", "source", ".", "project", ",", "\"datasetId\"", ":", "self", ".", "source", ".", "dataset_id", ",", "\"tableId\"", ":", "self", ".", "source", ".", "t...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
ExtractJob.from_api_repr
Factory: construct a job given its API representation .. note: This method assumes that the project found in the resource matches the client's project. :type resource: dict :param resource: dataset job representation returned from the API :type client: :class:`...
bigquery/google/cloud/bigquery/job.py
def from_api_repr(cls, resource, 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. :type resource: dict :param resource: dataset job representation ...
def from_api_repr(cls, resource, 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. :type resource: dict :param resource: dataset job representation ...
[ "Factory", ":", "construct", "a", "job", "given", "its", "API", "representation" ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L1902-L1935
[ "def", "from_api_repr", "(", "cls", ",", "resource", ",", "client", ")", ":", "job_id", ",", "config_resource", "=", "cls", ".", "_get_resource_config", "(", "resource", ")", "config", "=", "ExtractJobConfig", ".", "from_api_repr", "(", "config_resource", ")", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
QueryJobConfig.default_dataset
google.cloud.bigquery.dataset.DatasetReference: the default dataset to use for unqualified table names in the query or :data:`None` if not set. The ``default_dataset`` setter accepts: - a :class:`~google.cloud.bigquery.dataset.Dataset`, or - a :class:`~google.cloud.bigquery.dat...
bigquery/google/cloud/bigquery/job.py
def default_dataset(self): """google.cloud.bigquery.dataset.DatasetReference: the default dataset to use for unqualified table names in the query or :data:`None` if not set. The ``default_dataset`` setter accepts: - a :class:`~google.cloud.bigquery.dataset.Dataset`, or ...
def default_dataset(self): """google.cloud.bigquery.dataset.DatasetReference: the default dataset to use for unqualified table names in the query or :data:`None` if not set. The ``default_dataset`` setter accepts: - a :class:`~google.cloud.bigquery.dataset.Dataset`, or ...
[ "google", ".", "cloud", ".", "bigquery", ".", "dataset", ".", "DatasetReference", ":", "the", "default", "dataset", "to", "use", "for", "unqualified", "table", "names", "in", "the", "query", "or", ":", "data", ":", "None", "if", "not", "set", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L2028-L2047
[ "def", "default_dataset", "(", "self", ")", ":", "prop", "=", "self", ".", "_get_sub_prop", "(", "\"defaultDataset\"", ")", "if", "prop", "is", "not", "None", ":", "prop", "=", "DatasetReference", ".", "from_api_repr", "(", "prop", ")", "return", "prop" ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
QueryJobConfig.destination
google.cloud.bigquery.table.TableReference: table where results are written or :data:`None` if not set. The ``destination`` setter accepts: - a :class:`~google.cloud.bigquery.table.Table`, or - a :class:`~google.cloud.bigquery.table.TableReference`, or - a :class:`str` of the f...
bigquery/google/cloud/bigquery/job.py
def destination(self): """google.cloud.bigquery.table.TableReference: table where results are written or :data:`None` if not set. The ``destination`` setter accepts: - a :class:`~google.cloud.bigquery.table.Table`, or - a :class:`~google.cloud.bigquery.table.TableReference`, or...
def destination(self): """google.cloud.bigquery.table.TableReference: table where results are written or :data:`None` if not set. The ``destination`` setter accepts: - a :class:`~google.cloud.bigquery.table.Table`, or - a :class:`~google.cloud.bigquery.table.TableReference`, or...
[ "google", ".", "cloud", ".", "bigquery", ".", "table", ".", "TableReference", ":", "table", "where", "results", "are", "written", "or", ":", "data", ":", "None", "if", "not", "set", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L2065-L2084
[ "def", "destination", "(", "self", ")", ":", "prop", "=", "self", ".", "_get_sub_prop", "(", "\"destinationTable\"", ")", "if", "prop", "is", "not", "None", ":", "prop", "=", "TableReference", ".", "from_api_repr", "(", "prop", ")", "return", "prop" ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
QueryJobConfig.table_definitions
Dict[str, google.cloud.bigquery.external_config.ExternalConfig]: Definitions for external tables or :data:`None` if not set. See https://g.co/cloud/bigquery/docs/reference/rest/v2/jobs#configuration.query.tableDefinitions
bigquery/google/cloud/bigquery/job.py
def table_definitions(self): """Dict[str, google.cloud.bigquery.external_config.ExternalConfig]: Definitions for external tables or :data:`None` if not set. See https://g.co/cloud/bigquery/docs/reference/rest/v2/jobs#configuration.query.tableDefinitions """ prop = self._...
def table_definitions(self): """Dict[str, google.cloud.bigquery.external_config.ExternalConfig]: Definitions for external tables or :data:`None` if not set. See https://g.co/cloud/bigquery/docs/reference/rest/v2/jobs#configuration.query.tableDefinitions """ prop = self._...
[ "Dict", "[", "str", "google", ".", "cloud", ".", "bigquery", ".", "external_config", ".", "ExternalConfig", "]", ":", "Definitions", "for", "external", "tables", "or", ":", "data", ":", "None", "if", "not", "set", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L2238-L2248
[ "def", "table_definitions", "(", "self", ")", ":", "prop", "=", "self", ".", "_get_sub_prop", "(", "\"tableDefinitions\"", ")", "if", "prop", "is", "not", "None", ":", "prop", "=", "_from_api_repr_table_defs", "(", "prop", ")", "return", "prop" ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
QueryJobConfig.to_api_repr
Build an API representation of the query job config. Returns: dict: A dictionary in the format used by the BigQuery API.
bigquery/google/cloud/bigquery/job.py
def to_api_repr(self): """Build an API representation of the query job config. Returns: dict: A dictionary in the format used by the BigQuery API. """ resource = copy.deepcopy(self._properties) # Query parameters have an addition property associated with them ...
def to_api_repr(self): """Build an API representation of the query job config. Returns: dict: A dictionary in the format used by the BigQuery API. """ resource = copy.deepcopy(self._properties) # Query parameters have an addition property associated with them ...
[ "Build", "an", "API", "representation", "of", "the", "query", "job", "config", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L2311-L2328
[ "def", "to_api_repr", "(", "self", ")", ":", "resource", "=", "copy", ".", "deepcopy", "(", "self", ".", "_properties", ")", "# Query parameters have an addition property associated with them", "# to indicate if the query is using named or positional parameters.", "query_paramete...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
QueryJob.to_api_repr
Generate a resource for :meth:`_begin`.
bigquery/google/cloud/bigquery/job.py
def to_api_repr(self): """Generate a resource for :meth:`_begin`.""" configuration = self._configuration.to_api_repr() resource = { "jobReference": self._properties["jobReference"], "configuration": configuration, } configuration["query"]["query"] = self....
def to_api_repr(self): """Generate a resource for :meth:`_begin`.""" configuration = self._configuration.to_api_repr() resource = { "jobReference": self._properties["jobReference"], "configuration": configuration, } configuration["query"]["query"] = self....
[ "Generate", "a", "resource", "for", ":", "meth", ":", "_begin", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L2518-L2528
[ "def", "to_api_repr", "(", "self", ")", ":", "configuration", "=", "self", ".", "_configuration", ".", "to_api_repr", "(", ")", "resource", "=", "{", "\"jobReference\"", ":", "self", ".", "_properties", "[", "\"jobReference\"", "]", ",", "\"configuration\"", "...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
QueryJob.from_api_repr
Factory: construct a job given its API representation :type resource: dict :param resource: dataset job representation returned from the API :type client: :class:`google.cloud.bigquery.client.Client` :param client: Client which holds credentials and project conf...
bigquery/google/cloud/bigquery/job.py
def from_api_repr(cls, resource, client): """Factory: construct a job given its API representation :type resource: dict :param resource: dataset job representation returned from the API :type client: :class:`google.cloud.bigquery.client.Client` :param client: Client which hold...
def from_api_repr(cls, resource, client): """Factory: construct a job given its API representation :type resource: dict :param resource: dataset job representation returned from the API :type client: :class:`google.cloud.bigquery.client.Client` :param client: Client which hold...
[ "Factory", ":", "construct", "a", "job", "given", "its", "API", "representation" ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L2535-L2552
[ "def", "from_api_repr", "(", "cls", ",", "resource", ",", "client", ")", ":", "job_id", ",", "config", "=", "cls", ".", "_get_resource_config", "(", "resource", ")", "query", "=", "config", "[", "\"query\"", "]", "[", "\"query\"", "]", "job", "=", "cls",...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
QueryJob.query_plan
Return query plan from job statistics, if present. See: https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#statistics.query.queryPlan :rtype: list of :class:`QueryPlanEntry` :returns: mappings describing the query plan, or an empty list if the query has not...
bigquery/google/cloud/bigquery/job.py
def query_plan(self): """Return query plan from job statistics, if present. See: https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#statistics.query.queryPlan :rtype: list of :class:`QueryPlanEntry` :returns: mappings describing the query plan, or an empty list ...
def query_plan(self): """Return query plan from job statistics, if present. See: https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#statistics.query.queryPlan :rtype: list of :class:`QueryPlanEntry` :returns: mappings describing the query plan, or an empty list ...
[ "Return", "query", "plan", "from", "job", "statistics", "if", "present", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L2555-L2566
[ "def", "query_plan", "(", "self", ")", ":", "plan_entries", "=", "self", ".", "_job_statistics", "(", ")", ".", "get", "(", "\"queryPlan\"", ",", "(", ")", ")", "return", "[", "QueryPlanEntry", ".", "from_api_repr", "(", "entry", ")", "for", "entry", "in...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
QueryJob.timeline
List(TimelineEntry): Return the query execution timeline from job statistics.
bigquery/google/cloud/bigquery/job.py
def timeline(self): """List(TimelineEntry): Return the query execution timeline from job statistics. """ raw = self._job_statistics().get("timeline", ()) return [TimelineEntry.from_api_repr(entry) for entry in raw]
def timeline(self): """List(TimelineEntry): Return the query execution timeline from job statistics. """ raw = self._job_statistics().get("timeline", ()) return [TimelineEntry.from_api_repr(entry) for entry in raw]
[ "List", "(", "TimelineEntry", ")", ":", "Return", "the", "query", "execution", "timeline", "from", "job", "statistics", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L2569-L2574
[ "def", "timeline", "(", "self", ")", ":", "raw", "=", "self", ".", "_job_statistics", "(", ")", ".", "get", "(", "\"timeline\"", ",", "(", ")", ")", "return", "[", "TimelineEntry", ".", "from_api_repr", "(", "entry", ")", "for", "entry", "in", "raw", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
QueryJob.total_bytes_processed
Return total bytes processed from job statistics, if present. See: https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#statistics.query.totalBytesProcessed :rtype: int or None :returns: total bytes processed by the job, or None if job is not yet complete.
bigquery/google/cloud/bigquery/job.py
def total_bytes_processed(self): """Return total bytes processed from job statistics, if present. See: https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#statistics.query.totalBytesProcessed :rtype: int or None :returns: total bytes processed by the job, or None if j...
def total_bytes_processed(self): """Return total bytes processed from job statistics, if present. See: https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#statistics.query.totalBytesProcessed :rtype: int or None :returns: total bytes processed by the job, or None if j...
[ "Return", "total", "bytes", "processed", "from", "job", "statistics", "if", "present", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L2577-L2590
[ "def", "total_bytes_processed", "(", "self", ")", ":", "result", "=", "self", ".", "_job_statistics", "(", ")", ".", "get", "(", "\"totalBytesProcessed\"", ")", "if", "result", "is", "not", "None", ":", "result", "=", "int", "(", "result", ")", "return", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
QueryJob.total_bytes_billed
Return total bytes billed from job statistics, if present. See: https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#statistics.query.totalBytesBilled :rtype: int or None :returns: total bytes processed by the job, or None if job is not yet complete.
bigquery/google/cloud/bigquery/job.py
def total_bytes_billed(self): """Return total bytes billed from job statistics, if present. See: https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#statistics.query.totalBytesBilled :rtype: int or None :returns: total bytes processed by the job, or None if job is not...
def total_bytes_billed(self): """Return total bytes billed from job statistics, if present. See: https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#statistics.query.totalBytesBilled :rtype: int or None :returns: total bytes processed by the job, or None if job is not...
[ "Return", "total", "bytes", "billed", "from", "job", "statistics", "if", "present", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L2593-L2606
[ "def", "total_bytes_billed", "(", "self", ")", ":", "result", "=", "self", ".", "_job_statistics", "(", ")", ".", "get", "(", "\"totalBytesBilled\"", ")", "if", "result", "is", "not", "None", ":", "result", "=", "int", "(", "result", ")", "return", "resu...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
QueryJob.ddl_target_table
Optional[TableReference]: Return the DDL target table, present for CREATE/DROP TABLE/VIEW queries. See: https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#statistics.query.ddlTargetTable
bigquery/google/cloud/bigquery/job.py
def ddl_target_table(self): """Optional[TableReference]: Return the DDL target table, present for CREATE/DROP TABLE/VIEW queries. See: https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#statistics.query.ddlTargetTable """ prop = self._job_statistics().get(...
def ddl_target_table(self): """Optional[TableReference]: Return the DDL target table, present for CREATE/DROP TABLE/VIEW queries. See: https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#statistics.query.ddlTargetTable """ prop = self._job_statistics().get(...
[ "Optional", "[", "TableReference", "]", ":", "Return", "the", "DDL", "target", "table", "present", "for", "CREATE", "/", "DROP", "TABLE", "/", "VIEW", "queries", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L2645-L2655
[ "def", "ddl_target_table", "(", "self", ")", ":", "prop", "=", "self", ".", "_job_statistics", "(", ")", ".", "get", "(", "\"ddlTargetTable\"", ")", "if", "prop", "is", "not", "None", ":", "prop", "=", "TableReference", ".", "from_api_repr", "(", "prop", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
QueryJob.num_dml_affected_rows
Return the number of DML rows affected by the job. See: https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#statistics.query.numDmlAffectedRows :rtype: int or None :returns: number of DML rows affected by the job, or None if job is not yet complete.
bigquery/google/cloud/bigquery/job.py
def num_dml_affected_rows(self): """Return the number of DML rows affected by the job. See: https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#statistics.query.numDmlAffectedRows :rtype: int or None :returns: number of DML rows affected by the job, or None if job is ...
def num_dml_affected_rows(self): """Return the number of DML rows affected by the job. See: https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#statistics.query.numDmlAffectedRows :rtype: int or None :returns: number of DML rows affected by the job, or None if job is ...
[ "Return", "the", "number", "of", "DML", "rows", "affected", "by", "the", "job", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L2658-L2671
[ "def", "num_dml_affected_rows", "(", "self", ")", ":", "result", "=", "self", ".", "_job_statistics", "(", ")", ".", "get", "(", "\"numDmlAffectedRows\"", ")", "if", "result", "is", "not", "None", ":", "result", "=", "int", "(", "result", ")", "return", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
QueryJob.referenced_tables
Return referenced tables from job statistics, if present. See: https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#statistics.query.referencedTables :rtype: list of dict :returns: mappings describing the query plan, or an empty list if the query has not yet ...
bigquery/google/cloud/bigquery/job.py
def referenced_tables(self): """Return referenced tables from job statistics, if present. See: https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#statistics.query.referencedTables :rtype: list of dict :returns: mappings describing the query plan, or an empty list ...
def referenced_tables(self): """Return referenced tables from job statistics, if present. See: https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#statistics.query.referencedTables :rtype: list of dict :returns: mappings describing the query plan, or an empty list ...
[ "Return", "referenced", "tables", "from", "job", "statistics", "if", "present", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L2692-L2718
[ "def", "referenced_tables", "(", "self", ")", ":", "tables", "=", "[", "]", "datasets_by_project_name", "=", "{", "}", "for", "table", "in", "self", ".", "_job_statistics", "(", ")", ".", "get", "(", "\"referencedTables\"", ",", "(", ")", ")", ":", "t_pr...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
QueryJob.undeclared_query_parameters
Return undeclared query parameters from job statistics, if present. See: https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#statistics.query.undeclaredQueryParameters :rtype: list of :class:`~google.cloud.bigquery.ArrayQueryParameter`, :class:`~go...
bigquery/google/cloud/bigquery/job.py
def undeclared_query_parameters(self): """Return undeclared query parameters from job statistics, if present. See: https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#statistics.query.undeclaredQueryParameters :rtype: list of :class:`~google.cloud.bigq...
def undeclared_query_parameters(self): """Return undeclared query parameters from job statistics, if present. See: https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#statistics.query.undeclaredQueryParameters :rtype: list of :class:`~google.cloud.bigq...
[ "Return", "undeclared", "query", "parameters", "from", "job", "statistics", "if", "present", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L2721-L2750
[ "def", "undeclared_query_parameters", "(", "self", ")", ":", "parameters", "=", "[", "]", "undeclared", "=", "self", ".", "_job_statistics", "(", ")", ".", "get", "(", "\"undeclaredQueryParameters\"", ",", "(", ")", ")", "for", "parameter", "in", "undeclared",...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
QueryJob.estimated_bytes_processed
Return the estimated number of bytes processed by the query. See: https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#statistics.query.estimatedBytesProcessed :rtype: int or None :returns: number of DML rows affected by the job, or None if job is not yet com...
bigquery/google/cloud/bigquery/job.py
def estimated_bytes_processed(self): """Return the estimated number of bytes processed by the query. See: https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#statistics.query.estimatedBytesProcessed :rtype: int or None :returns: number of DML rows affected by the job,...
def estimated_bytes_processed(self): """Return the estimated number of bytes processed by the query. See: https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#statistics.query.estimatedBytesProcessed :rtype: int or None :returns: number of DML rows affected by the job,...
[ "Return", "the", "estimated", "number", "of", "bytes", "processed", "by", "the", "query", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L2753-L2766
[ "def", "estimated_bytes_processed", "(", "self", ")", ":", "result", "=", "self", ".", "_job_statistics", "(", ")", ".", "get", "(", "\"estimatedBytesProcessed\"", ")", "if", "result", "is", "not", "None", ":", "result", "=", "int", "(", "result", ")", "re...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
QueryJob.done
Refresh the job and checks if it is complete. :rtype: bool :returns: True if the job is complete, False otherwise.
bigquery/google/cloud/bigquery/job.py
def done(self, retry=DEFAULT_RETRY): """Refresh the job and checks if it is complete. :rtype: bool :returns: True if the job is complete, False otherwise. """ # Since the API to getQueryResults can hang up to the timeout value # (default of 10 seconds), set the timeout p...
def done(self, retry=DEFAULT_RETRY): """Refresh the job and checks if it is complete. :rtype: bool :returns: True if the job is complete, False otherwise. """ # Since the API to getQueryResults can hang up to the timeout value # (default of 10 seconds), set the timeout p...
[ "Refresh", "the", "job", "and", "checks", "if", "it", "is", "complete", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L2768-L2804
[ "def", "done", "(", "self", ",", "retry", "=", "DEFAULT_RETRY", ")", ":", "# Since the API to getQueryResults can hang up to the timeout value", "# (default of 10 seconds), set the timeout parameter to ensure that", "# the timeout from the futures API is respected. See:", "# https://github...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
QueryJob.result
Start the job and wait for it to complete and get the result. :type timeout: float :param timeout: How long (in seconds) to wait for job to complete before raising a :class:`concurrent.futures.TimeoutError`. :type retry: :class:`google.api_core.retry.Retry` :par...
bigquery/google/cloud/bigquery/job.py
def result(self, timeout=None, retry=DEFAULT_RETRY): """Start the job and wait for it to complete and get the result. :type timeout: float :param timeout: How long (in seconds) to wait for job to complete before raising a :class:`concurrent.futures.TimeoutError`. ...
def result(self, timeout=None, retry=DEFAULT_RETRY): """Start the job and wait for it to complete and get the result. :type timeout: float :param timeout: How long (in seconds) to wait for job to complete before raising a :class:`concurrent.futures.TimeoutError`. ...
[ "Start", "the", "job", "and", "wait", "for", "it", "to", "complete", "and", "get", "the", "result", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L2810-L2852
[ "def", "result", "(", "self", ",", "timeout", "=", "None", ",", "retry", "=", "DEFAULT_RETRY", ")", ":", "super", "(", "QueryJob", ",", "self", ")", ".", "result", "(", "timeout", "=", "timeout", ")", "# Return an iterator instead of returning the job.", "if",...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
QueryJob.to_dataframe
Return a pandas DataFrame from a QueryJob Args: bqstorage_client ( \ google.cloud.bigquery_storage_v1beta1.BigQueryStorageClient \ ): **Alpha Feature** Optional. A BigQuery Storage API client. If supplied, use the faster BigQuery Storage A...
bigquery/google/cloud/bigquery/job.py
def to_dataframe(self, bqstorage_client=None, dtypes=None, progress_bar_type=None): """Return a pandas DataFrame from a QueryJob Args: bqstorage_client ( \ google.cloud.bigquery_storage_v1beta1.BigQueryStorageClient \ ): **Alpha Feature** Optional...
def to_dataframe(self, bqstorage_client=None, dtypes=None, progress_bar_type=None): """Return a pandas DataFrame from a QueryJob Args: bqstorage_client ( \ google.cloud.bigquery_storage_v1beta1.BigQueryStorageClient \ ): **Alpha Feature** Optional...
[ "Return", "a", "pandas", "DataFrame", "from", "a", "QueryJob" ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L2854-L2904
[ "def", "to_dataframe", "(", "self", ",", "bqstorage_client", "=", "None", ",", "dtypes", "=", "None", ",", "progress_bar_type", "=", "None", ")", ":", "return", "self", ".", "result", "(", ")", ".", "to_dataframe", "(", "bqstorage_client", "=", "bqstorage_cl...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
QueryPlanEntryStep.from_api_repr
Factory: construct instance from the JSON repr. :type resource: dict :param resource: JSON representation of the entry :rtype: :class:`QueryPlanEntryStep` :return: new instance built from the resource
bigquery/google/cloud/bigquery/job.py
def from_api_repr(cls, resource): """Factory: construct instance from the JSON repr. :type resource: dict :param resource: JSON representation of the entry :rtype: :class:`QueryPlanEntryStep` :return: new instance built from the resource """ return cls(kind=reso...
def from_api_repr(cls, resource): """Factory: construct instance from the JSON repr. :type resource: dict :param resource: JSON representation of the entry :rtype: :class:`QueryPlanEntryStep` :return: new instance built from the resource """ return cls(kind=reso...
[ "Factory", ":", "construct", "instance", "from", "the", "JSON", "repr", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L2925-L2934
[ "def", "from_api_repr", "(", "cls", ",", "resource", ")", ":", "return", "cls", "(", "kind", "=", "resource", ".", "get", "(", "\"kind\"", ")", ",", "substeps", "=", "resource", ".", "get", "(", "\"substeps\"", ",", "(", ")", ")", ")" ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
QueryPlanEntry.start
Union[Datetime, None]: Datetime when the stage started.
bigquery/google/cloud/bigquery/job.py
def start(self): """Union[Datetime, None]: Datetime when the stage started.""" if self._properties.get("startMs") is None: return None return _helpers._datetime_from_microseconds( int(self._properties.get("startMs")) * 1000.0 )
def start(self): """Union[Datetime, None]: Datetime when the stage started.""" if self._properties.get("startMs") is None: return None return _helpers._datetime_from_microseconds( int(self._properties.get("startMs")) * 1000.0 )
[ "Union", "[", "Datetime", "None", "]", ":", "Datetime", "when", "the", "stage", "started", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L2981-L2987
[ "def", "start", "(", "self", ")", ":", "if", "self", ".", "_properties", ".", "get", "(", "\"startMs\"", ")", "is", "None", ":", "return", "None", "return", "_helpers", ".", "_datetime_from_microseconds", "(", "int", "(", "self", ".", "_properties", ".", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
QueryPlanEntry.end
Union[Datetime, None]: Datetime when the stage ended.
bigquery/google/cloud/bigquery/job.py
def end(self): """Union[Datetime, None]: Datetime when the stage ended.""" if self._properties.get("endMs") is None: return None return _helpers._datetime_from_microseconds( int(self._properties.get("endMs")) * 1000.0 )
def end(self): """Union[Datetime, None]: Datetime when the stage ended.""" if self._properties.get("endMs") is None: return None return _helpers._datetime_from_microseconds( int(self._properties.get("endMs")) * 1000.0 )
[ "Union", "[", "Datetime", "None", "]", ":", "Datetime", "when", "the", "stage", "ended", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L2990-L2996
[ "def", "end", "(", "self", ")", ":", "if", "self", ".", "_properties", ".", "get", "(", "\"endMs\"", ")", "is", "None", ":", "return", "None", "return", "_helpers", ".", "_datetime_from_microseconds", "(", "int", "(", "self", ".", "_properties", ".", "ge...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
QueryPlanEntry.input_stages
List(int): Entry IDs for stages that were inputs for this stage.
bigquery/google/cloud/bigquery/job.py
def input_stages(self): """List(int): Entry IDs for stages that were inputs for this stage.""" if self._properties.get("inputStages") is None: return [] return [ _helpers._int_or_none(entry) for entry in self._properties.get("inputStages") ]
def input_stages(self): """List(int): Entry IDs for stages that were inputs for this stage.""" if self._properties.get("inputStages") is None: return [] return [ _helpers._int_or_none(entry) for entry in self._properties.get("inputStages") ]
[ "List", "(", "int", ")", ":", "Entry", "IDs", "for", "stages", "that", "were", "inputs", "for", "this", "stage", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L2999-L3006
[ "def", "input_stages", "(", "self", ")", ":", "if", "self", ".", "_properties", ".", "get", "(", "\"inputStages\"", ")", "is", "None", ":", "return", "[", "]", "return", "[", "_helpers", ".", "_int_or_none", "(", "entry", ")", "for", "entry", "in", "se...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
UnknownJob.from_api_repr
Construct an UnknownJob from the JSON representation. Args: resource (dict): JSON representation of a job. client (google.cloud.bigquery.client.Client): Client connected to BigQuery API. Returns: UnknownJob: Job corresponding to the resource.
bigquery/google/cloud/bigquery/job.py
def from_api_repr(cls, resource, client): """Construct an UnknownJob from the JSON representation. Args: resource (dict): JSON representation of a job. client (google.cloud.bigquery.client.Client): Client connected to BigQuery API. Returns: U...
def from_api_repr(cls, resource, client): """Construct an UnknownJob from the JSON representation. Args: resource (dict): JSON representation of a job. client (google.cloud.bigquery.client.Client): Client connected to BigQuery API. Returns: U...
[ "Construct", "an", "UnknownJob", "from", "the", "JSON", "representation", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/job.py#L3244-L3262
[ "def", "from_api_repr", "(", "cls", ",", "resource", ",", "client", ")", ":", "job_ref_properties", "=", "resource", ".", "get", "(", "\"jobReference\"", ",", "{", "\"projectId\"", ":", "client", ".", "project", "}", ")", "job_ref", "=", "_JobReference", "."...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
ManagedZone.from_api_repr
Factory: construct a zone given its API representation :type resource: dict :param resource: zone resource representation returned from the API :type client: :class:`google.cloud.dns.client.Client` :param client: Client which holds credentials and project config...
dns/google/cloud/dns/zone.py
def from_api_repr(cls, resource, client): """Factory: construct a zone given its API representation :type resource: dict :param resource: zone resource representation returned from the API :type client: :class:`google.cloud.dns.client.Client` :param client: Client which holds ...
def from_api_repr(cls, resource, client): """Factory: construct a zone given its API representation :type resource: dict :param resource: zone resource representation returned from the API :type client: :class:`google.cloud.dns.client.Client` :param client: Client which holds ...
[ "Factory", ":", "construct", "a", "zone", "given", "its", "API", "representation" ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/dns/google/cloud/dns/zone.py#L60-L81
[ "def", "from_api_repr", "(", "cls", ",", "resource", ",", "client", ")", ":", "name", "=", "resource", ".", "get", "(", "\"name\"", ")", "dns_name", "=", "resource", ".", "get", "(", "\"dnsName\"", ")", "if", "name", "is", "None", "or", "dns_name", "is...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
ManagedZone.description
Update description of the zone. :type value: str :param value: (Optional) new description :raises: ValueError for invalid value types.
dns/google/cloud/dns/zone.py
def description(self, value): """Update description of the zone. :type value: str :param value: (Optional) new description :raises: ValueError for invalid value types. """ if not isinstance(value, six.string_types) and value is not None: raise ValueError("Pa...
def description(self, value): """Update description of the zone. :type value: str :param value: (Optional) new description :raises: ValueError for invalid value types. """ if not isinstance(value, six.string_types) and value is not None: raise ValueError("Pa...
[ "Update", "description", "of", "the", "zone", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/dns/google/cloud/dns/zone.py#L138-L148
[ "def", "description", "(", "self", ",", "value", ")", ":", "if", "not", "isinstance", "(", "value", ",", "six", ".", "string_types", ")", "and", "value", "is", "not", "None", ":", "raise", "ValueError", "(", "\"Pass a string, or None\"", ")", "self", ".", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
ManagedZone.name_server_set
Update named set of DNS name servers. :type value: str :param value: (Optional) new title :raises: ValueError for invalid value types.
dns/google/cloud/dns/zone.py
def name_server_set(self, value): """Update named set of DNS name servers. :type value: str :param value: (Optional) new title :raises: ValueError for invalid value types. """ if not isinstance(value, six.string_types) and value is not None: raise ValueError...
def name_server_set(self, value): """Update named set of DNS name servers. :type value: str :param value: (Optional) new title :raises: ValueError for invalid value types. """ if not isinstance(value, six.string_types) and value is not None: raise ValueError...
[ "Update", "named", "set", "of", "DNS", "name", "servers", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/dns/google/cloud/dns/zone.py#L165-L175
[ "def", "name_server_set", "(", "self", ",", "value", ")", ":", "if", "not", "isinstance", "(", "value", ",", "six", ".", "string_types", ")", "and", "value", "is", "not", "None", ":", "raise", "ValueError", "(", "\"Pass a string, or None\"", ")", "self", "...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
ManagedZone.resource_record_set
Construct a resource record set bound to this zone. :type name: str :param name: Name of the record set. :type record_type: str :param record_type: RR type :type ttl: int :param ttl: TTL for the RR, in seconds :type rrdatas: list of string :param rrdat...
dns/google/cloud/dns/zone.py
def resource_record_set(self, name, record_type, ttl, rrdatas): """Construct a resource record set bound to this zone. :type name: str :param name: Name of the record set. :type record_type: str :param record_type: RR type :type ttl: int :param ttl: TTL for the...
def resource_record_set(self, name, record_type, ttl, rrdatas): """Construct a resource record set bound to this zone. :type name: str :param name: Name of the record set. :type record_type: str :param record_type: RR type :type ttl: int :param ttl: TTL for the...
[ "Construct", "a", "resource", "record", "set", "bound", "to", "this", "zone", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/dns/google/cloud/dns/zone.py#L177-L195
[ "def", "resource_record_set", "(", "self", ",", "name", ",", "record_type", ",", "ttl", ",", "rrdatas", ")", ":", "return", "ResourceRecordSet", "(", "name", ",", "record_type", ",", "ttl", ",", "rrdatas", ",", "zone", "=", "self", ")" ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
ManagedZone._set_properties
Update properties from resource in body of ``api_response`` :type api_response: dict :param api_response: response returned from an API call
dns/google/cloud/dns/zone.py
def _set_properties(self, api_response): """Update properties from resource in body of ``api_response`` :type api_response: dict :param api_response: response returned from an API call """ self._properties.clear() cleaned = api_response.copy() self.dns_name = cle...
def _set_properties(self, api_response): """Update properties from resource in body of ``api_response`` :type api_response: dict :param api_response: response returned from an API call """ self._properties.clear() cleaned = api_response.copy() self.dns_name = cle...
[ "Update", "properties", "from", "resource", "in", "body", "of", "api_response" ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/dns/google/cloud/dns/zone.py#L220-L231
[ "def", "_set_properties", "(", "self", ",", "api_response", ")", ":", "self", ".", "_properties", ".", "clear", "(", ")", "cleaned", "=", "api_response", ".", "copy", "(", ")", "self", ".", "dns_name", "=", "cleaned", ".", "pop", "(", "\"dnsName\"", ",",...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
ManagedZone._build_resource
Generate a resource for ``create`` or ``update``.
dns/google/cloud/dns/zone.py
def _build_resource(self): """Generate a resource for ``create`` or ``update``.""" resource = {"name": self.name} if self.dns_name is not None: resource["dnsName"] = self.dns_name if self.description is not None: resource["description"] = self.description ...
def _build_resource(self): """Generate a resource for ``create`` or ``update``.""" resource = {"name": self.name} if self.dns_name is not None: resource["dnsName"] = self.dns_name if self.description is not None: resource["description"] = self.description ...
[ "Generate", "a", "resource", "for", "create", "or", "update", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/dns/google/cloud/dns/zone.py#L233-L246
[ "def", "_build_resource", "(", "self", ")", ":", "resource", "=", "{", "\"name\"", ":", "self", ".", "name", "}", "if", "self", ".", "dns_name", "is", "not", "None", ":", "resource", "[", "\"dnsName\"", "]", "=", "self", ".", "dns_name", "if", "self", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
ManagedZone.create
API call: create the zone via a PUT request See https://cloud.google.com/dns/api/v1/managedZones/create :type client: :class:`google.cloud.dns.client.Client` :param client: (Optional) the client to use. If not passed, falls back to the ``client`` stored on the...
dns/google/cloud/dns/zone.py
def create(self, client=None): """API call: create the zone via a PUT request See https://cloud.google.com/dns/api/v1/managedZones/create :type client: :class:`google.cloud.dns.client.Client` :param client: (Optional) the client to use. If not passed, falls back t...
def create(self, client=None): """API call: create the zone via a PUT request See https://cloud.google.com/dns/api/v1/managedZones/create :type client: :class:`google.cloud.dns.client.Client` :param client: (Optional) the client to use. If not passed, falls back t...
[ "API", "call", ":", "create", "the", "zone", "via", "a", "PUT", "request" ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/dns/google/cloud/dns/zone.py#L248-L264
[ "def", "create", "(", "self", ",", "client", "=", "None", ")", ":", "client", "=", "self", ".", "_require_client", "(", "client", ")", "path", "=", "\"/projects/%s/managedZones\"", "%", "(", "self", ".", "project", ",", ")", "api_response", "=", "client", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
ManagedZone.delete
API call: delete the zone via a DELETE request See https://cloud.google.com/dns/api/v1/managedZones/delete :type client: :class:`google.cloud.dns.client.Client` :param client: (Optional) the client to use. If not passed, falls back to the ``client`` stored on ...
dns/google/cloud/dns/zone.py
def delete(self, client=None): """API call: delete the zone via a DELETE request See https://cloud.google.com/dns/api/v1/managedZones/delete :type client: :class:`google.cloud.dns.client.Client` :param client: (Optional) the client to use. If not passed, falls bac...
def delete(self, client=None): """API call: delete the zone via a DELETE request See https://cloud.google.com/dns/api/v1/managedZones/delete :type client: :class:`google.cloud.dns.client.Client` :param client: (Optional) the client to use. If not passed, falls bac...
[ "API", "call", ":", "delete", "the", "zone", "via", "a", "DELETE", "request" ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/dns/google/cloud/dns/zone.py#L305-L317
[ "def", "delete", "(", "self", ",", "client", "=", "None", ")", ":", "client", "=", "self", ".", "_require_client", "(", "client", ")", "client", ".", "_connection", ".", "api_request", "(", "method", "=", "\"DELETE\"", ",", "path", "=", "self", ".", "p...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
ManagedZone.list_resource_record_sets
List resource record sets for this zone. See https://cloud.google.com/dns/api/v1/resourceRecordSets/list :type max_results: int :param max_results: Optional. The maximum number of resource record sets to return. Defaults to a sensible value ...
dns/google/cloud/dns/zone.py
def list_resource_record_sets(self, max_results=None, page_token=None, client=None): """List resource record sets for this zone. See https://cloud.google.com/dns/api/v1/resourceRecordSets/list :type max_results: int :param max_results: Optional. The maximum number of resource r...
def list_resource_record_sets(self, max_results=None, page_token=None, client=None): """List resource record sets for this zone. See https://cloud.google.com/dns/api/v1/resourceRecordSets/list :type max_results: int :param max_results: Optional. The maximum number of resource r...
[ "List", "resource", "record", "sets", "for", "this", "zone", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/dns/google/cloud/dns/zone.py#L319-L358
[ "def", "list_resource_record_sets", "(", "self", ",", "max_results", "=", "None", ",", "page_token", "=", "None", ",", "client", "=", "None", ")", ":", "client", "=", "self", ".", "_require_client", "(", "client", ")", "path", "=", "\"/projects/%s/managedZones...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
VisionHelpers.annotate_image
Run image detection and annotation for an image. Example: >>> from google.cloud.vision_v1 import ImageAnnotatorClient >>> client = ImageAnnotatorClient() >>> request = { ... 'image': { ... 'source': {'image_uri': 'https://foo.com/image.jpg...
vision/google/cloud/vision_helpers/__init__.py
def annotate_image(self, request, retry=None, timeout=None): """Run image detection and annotation for an image. Example: >>> from google.cloud.vision_v1 import ImageAnnotatorClient >>> client = ImageAnnotatorClient() >>> request = { ... 'image': { ...
def annotate_image(self, request, retry=None, timeout=None): """Run image detection and annotation for an image. Example: >>> from google.cloud.vision_v1 import ImageAnnotatorClient >>> client = ImageAnnotatorClient() >>> request = { ... 'image': { ...
[ "Run", "image", "detection", "and", "annotation", "for", "an", "image", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/vision/google/cloud/vision_helpers/__init__.py#L29-L73
[ "def", "annotate_image", "(", "self", ",", "request", ",", "retry", "=", "None", ",", "timeout", "=", "None", ")", ":", "# If the image is a file handler, set the content.", "image", "=", "protobuf", ".", "get", "(", "request", ",", "\"image\"", ")", "if", "ha...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
delete_model
Sample ID: go/samples-tracker/1534
bigquery/samples/delete_model.py
def delete_model(client, model_id): """Sample ID: go/samples-tracker/1534""" # [START bigquery_delete_model] from google.cloud import bigquery # TODO(developer): Construct a BigQuery client object. # client = bigquery.Client() # TODO(developer): Set model_id to the ID of the model to fetch. ...
def delete_model(client, model_id): """Sample ID: go/samples-tracker/1534""" # [START bigquery_delete_model] from google.cloud import bigquery # TODO(developer): Construct a BigQuery client object. # client = bigquery.Client() # TODO(developer): Set model_id to the ID of the model to fetch. ...
[ "Sample", "ID", ":", "go", "/", "samples", "-", "tracker", "/", "1534" ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/samples/delete_model.py#L16-L29
[ "def", "delete_model", "(", "client", ",", "model_id", ")", ":", "# [START bigquery_delete_model]", "from", "google", ".", "cloud", "import", "bigquery", "# TODO(developer): Construct a BigQuery client object.", "# client = bigquery.Client()", "# TODO(developer): Set model_id to th...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
list_models
Sample ID: go/samples-tracker/1512
bigquery/samples/list_models.py
def list_models(client, dataset_id): """Sample ID: go/samples-tracker/1512""" # [START bigquery_list_models] from google.cloud import bigquery # TODO(developer): Construct a BigQuery client object. # client = bigquery.Client() # TODO(developer): Set dataset_id to the ID of the dataset that co...
def list_models(client, dataset_id): """Sample ID: go/samples-tracker/1512""" # [START bigquery_list_models] from google.cloud import bigquery # TODO(developer): Construct a BigQuery client object. # client = bigquery.Client() # TODO(developer): Set dataset_id to the ID of the dataset that co...
[ "Sample", "ID", ":", "go", "/", "samples", "-", "tracker", "/", "1512" ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/samples/list_models.py#L16-L37
[ "def", "list_models", "(", "client", ",", "dataset_id", ")", ":", "# [START bigquery_list_models]", "from", "google", ".", "cloud", "import", "bigquery", "# TODO(developer): Construct a BigQuery client object.", "# client = bigquery.Client()", "# TODO(developer): Set dataset_id to ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
JobServiceClient.job_path
Return a fully-qualified job string.
talent/google/cloud/talent_v4beta1/gapic/job_service_client.py
def job_path(cls, project, jobs): """Return a fully-qualified job string.""" return google.api_core.path_template.expand( "projects/{project}/jobs/{jobs}", project=project, jobs=jobs )
def job_path(cls, project, jobs): """Return a fully-qualified job string.""" return google.api_core.path_template.expand( "projects/{project}/jobs/{jobs}", project=project, jobs=jobs )
[ "Return", "a", "fully", "-", "qualified", "job", "string", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/talent/google/cloud/talent_v4beta1/gapic/job_service_client.py#L92-L96
[ "def", "job_path", "(", "cls", ",", "project", ",", "jobs", ")", ":", "return", "google", ".", "api_core", ".", "path_template", ".", "expand", "(", "\"projects/{project}/jobs/{jobs}\"", ",", "project", "=", "project", ",", "jobs", "=", "jobs", ")" ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
JobServiceClient.create_job
Creates a new job. Typically, the job becomes searchable within 10 seconds, but it may take up to 5 minutes. Example: >>> from google.cloud import talent_v4beta1 >>> >>> client = talent_v4beta1.JobServiceClient() >>> >>> parent = clie...
talent/google/cloud/talent_v4beta1/gapic/job_service_client.py
def create_job( self, parent, job, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Creates a new job. Typically, the job becomes searchable within 10 seconds, but it may tak...
def create_job( self, parent, job, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Creates a new job. Typically, the job becomes searchable within 10 seconds, but it may tak...
[ "Creates", "a", "new", "job", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/talent/google/cloud/talent_v4beta1/gapic/job_service_client.py#L197-L269
[ "def", "create_job", "(", "self", ",", "parent", ",", "job", ",", "retry", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "method", ".", "DEFAULT", ",", "timeout", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "method", ".", "DEFAULT", "...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
JobServiceClient.get_job
Retrieves the specified job, whose status is OPEN or recently EXPIRED within the last 90 days. Example: >>> from google.cloud import talent_v4beta1 >>> >>> client = talent_v4beta1.JobServiceClient() >>> >>> name = client.job_path('[PROJECT]', ...
talent/google/cloud/talent_v4beta1/gapic/job_service_client.py
def get_job( self, name, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Retrieves the specified job, whose status is OPEN or recently EXPIRED within the last 90 days. Examp...
def get_job( self, name, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Retrieves the specified job, whose status is OPEN or recently EXPIRED within the last 90 days. Examp...
[ "Retrieves", "the", "specified", "job", "whose", "status", "is", "OPEN", "or", "recently", "EXPIRED", "within", "the", "last", "90", "days", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/talent/google/cloud/talent_v4beta1/gapic/job_service_client.py#L271-L331
[ "def", "get_job", "(", "self", ",", "name", ",", "retry", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "method", ".", "DEFAULT", ",", "timeout", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "method", ".", "DEFAULT", ",", "metadata", "...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
JobServiceClient.batch_delete_jobs
Deletes a list of ``Job``\ s by filter. Example: >>> from google.cloud import talent_v4beta1 >>> >>> client = talent_v4beta1.JobServiceClient() >>> >>> parent = client.project_path('[PROJECT]') >>> >>> # TODO: Initialize `filte...
talent/google/cloud/talent_v4beta1/gapic/job_service_client.py
def batch_delete_jobs( self, parent, filter_, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Deletes a list of ``Job``\ s by filter. Example: >>> from google.cl...
def batch_delete_jobs( self, parent, filter_, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Deletes a list of ``Job``\ s by filter. Example: >>> from google.cl...
[ "Deletes", "a", "list", "of", "Job", "\\", "s", "by", "filter", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/talent/google/cloud/talent_v4beta1/gapic/job_service_client.py#L595-L668
[ "def", "batch_delete_jobs", "(", "self", ",", "parent", ",", "filter_", ",", "retry", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "method", ".", "DEFAULT", ",", "timeout", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "method", ".", "DE...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
JobServiceClient.search_jobs
Searches for jobs using the provided ``SearchJobsRequest``. This call constrains the ``visibility`` of jobs present in the database, and only returns jobs that the caller has permission to search against. Example: >>> from google.cloud import talent_v4beta1 >>> ...
talent/google/cloud/talent_v4beta1/gapic/job_service_client.py
def search_jobs( self, parent, request_metadata, search_mode=None, job_query=None, enable_broadening=None, require_precise_result_size=None, histogram_queries=None, job_view=None, offset=None, page_size=None, order_by=None, ...
def search_jobs( self, parent, request_metadata, search_mode=None, job_query=None, enable_broadening=None, require_precise_result_size=None, histogram_queries=None, job_view=None, offset=None, page_size=None, order_by=None, ...
[ "Searches", "for", "jobs", "using", "the", "provided", "SearchJobsRequest", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/talent/google/cloud/talent_v4beta1/gapic/job_service_client.py#L670-L1024
[ "def", "search_jobs", "(", "self", ",", "parent", ",", "request_metadata", ",", "search_mode", "=", "None", ",", "job_query", "=", "None", ",", "enable_broadening", "=", "None", ",", "require_precise_result_size", "=", "None", ",", "histogram_queries", "=", "Non...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_compute_type_url
Compute a type URL for a klass. :type klass: type :param klass: class to be used as a factory for the given type :type prefix: str :param prefix: URL prefix for the type :rtype: str :returns: the URL, prefixed as appropriate
core/google/cloud/operation.py
def _compute_type_url(klass, prefix=_GOOGLE_APIS_PREFIX): """Compute a type URL for a klass. :type klass: type :param klass: class to be used as a factory for the given type :type prefix: str :param prefix: URL prefix for the type :rtype: str :returns: the URL, prefixed as appropriate ...
def _compute_type_url(klass, prefix=_GOOGLE_APIS_PREFIX): """Compute a type URL for a klass. :type klass: type :param klass: class to be used as a factory for the given type :type prefix: str :param prefix: URL prefix for the type :rtype: str :returns: the URL, prefixed as appropriate ...
[ "Compute", "a", "type", "URL", "for", "a", "klass", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/core/google/cloud/operation.py#L26-L39
[ "def", "_compute_type_url", "(", "klass", ",", "prefix", "=", "_GOOGLE_APIS_PREFIX", ")", ":", "name", "=", "klass", ".", "DESCRIPTOR", ".", "full_name", "return", "\"%s/%s\"", "%", "(", "prefix", ",", "name", ")" ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
register_type
Register a klass as the factory for a given type URL. :type klass: :class:`type` :param klass: class to be used as a factory for the given type :type type_url: str :param type_url: (Optional) URL naming the type. If not provided, infers the URL from the type descriptor. :rais...
core/google/cloud/operation.py
def register_type(klass, type_url=None): """Register a klass as the factory for a given type URL. :type klass: :class:`type` :param klass: class to be used as a factory for the given type :type type_url: str :param type_url: (Optional) URL naming the type. If not provided, inf...
def register_type(klass, type_url=None): """Register a klass as the factory for a given type URL. :type klass: :class:`type` :param klass: class to be used as a factory for the given type :type type_url: str :param type_url: (Optional) URL naming the type. If not provided, inf...
[ "Register", "a", "klass", "as", "the", "factory", "for", "a", "given", "type", "URL", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/core/google/cloud/operation.py#L42-L60
[ "def", "register_type", "(", "klass", ",", "type_url", "=", "None", ")", ":", "if", "type_url", "is", "None", ":", "type_url", "=", "_compute_type_url", "(", "klass", ")", "if", "type_url", "in", "_TYPE_URL_MAP", ":", "if", "_TYPE_URL_MAP", "[", "type_url", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_from_any
Convert an ``Any`` protobuf into the actual class. Uses the type URL to do the conversion. .. note:: This assumes that the type URL is already registered. :type any_pb: :class:`google.protobuf.any_pb2.Any` :param any_pb: An any object to be converted. :rtype: object :returns: The in...
core/google/cloud/operation.py
def _from_any(any_pb): """Convert an ``Any`` protobuf into the actual class. Uses the type URL to do the conversion. .. note:: This assumes that the type URL is already registered. :type any_pb: :class:`google.protobuf.any_pb2.Any` :param any_pb: An any object to be converted. :rtyp...
def _from_any(any_pb): """Convert an ``Any`` protobuf into the actual class. Uses the type URL to do the conversion. .. note:: This assumes that the type URL is already registered. :type any_pb: :class:`google.protobuf.any_pb2.Any` :param any_pb: An any object to be converted. :rtyp...
[ "Convert", "an", "Any", "protobuf", "into", "the", "actual", "class", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/core/google/cloud/operation.py#L63-L80
[ "def", "_from_any", "(", "any_pb", ")", ":", "klass", "=", "_TYPE_URL_MAP", "[", "any_pb", ".", "type_url", "]", "return", "klass", ".", "FromString", "(", "any_pb", ".", "value", ")" ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Operation.from_pb
Factory: construct an instance from a protobuf. :type operation_pb: :class:`~google.longrunning.operations_pb2.Operation` :param operation_pb: Protobuf to be parsed. :type client: object: must provide ``_operations_stub`` accessor. :param client: The client used to poll fo...
core/google/cloud/operation.py
def from_pb(cls, operation_pb, client, **caller_metadata): """Factory: construct an instance from a protobuf. :type operation_pb: :class:`~google.longrunning.operations_pb2.Operation` :param operation_pb: Protobuf to be parsed. :type client: object: must provide ``_operati...
def from_pb(cls, operation_pb, client, **caller_metadata): """Factory: construct an instance from a protobuf. :type operation_pb: :class:`~google.longrunning.operations_pb2.Operation` :param operation_pb: Protobuf to be parsed. :type client: object: must provide ``_operati...
[ "Factory", ":", "construct", "an", "instance", "from", "a", "protobuf", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/core/google/cloud/operation.py#L147-L166
[ "def", "from_pb", "(", "cls", ",", "operation_pb", ",", "client", ",", "*", "*", "caller_metadata", ")", ":", "result", "=", "cls", "(", "operation_pb", ".", "name", ",", "client", ",", "*", "*", "caller_metadata", ")", "result", ".", "_update_state", "(...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Operation.from_dict
Factory: construct an instance from a dictionary. :type operation: dict :param operation: Operation as a JSON object. :type client: :class:`~google.cloud.client.Client` :param client: The client used to poll for the status of the operation. :type caller_metadata: dict ...
core/google/cloud/operation.py
def from_dict(cls, operation, client, **caller_metadata): """Factory: construct an instance from a dictionary. :type operation: dict :param operation: Operation as a JSON object. :type client: :class:`~google.cloud.client.Client` :param client: The client used to poll for the s...
def from_dict(cls, operation, client, **caller_metadata): """Factory: construct an instance from a dictionary. :type operation: dict :param operation: Operation as a JSON object. :type client: :class:`~google.cloud.client.Client` :param client: The client used to poll for the s...
[ "Factory", ":", "construct", "an", "instance", "from", "a", "dictionary", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/core/google/cloud/operation.py#L169-L188
[ "def", "from_dict", "(", "cls", ",", "operation", ",", "client", ",", "*", "*", "caller_metadata", ")", ":", "operation_pb", "=", "json_format", ".", "ParseDict", "(", "operation", ",", "operations_pb2", ".", "Operation", "(", ")", ")", "result", "=", "cls...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Operation._get_operation_rpc
Polls the status of the current operation. Uses gRPC request to check. :rtype: :class:`~google.longrunning.operations_pb2.Operation` :returns: The latest status of the current operation.
core/google/cloud/operation.py
def _get_operation_rpc(self): """Polls the status of the current operation. Uses gRPC request to check. :rtype: :class:`~google.longrunning.operations_pb2.Operation` :returns: The latest status of the current operation. """ request_pb = operations_pb2.GetOperationReques...
def _get_operation_rpc(self): """Polls the status of the current operation. Uses gRPC request to check. :rtype: :class:`~google.longrunning.operations_pb2.Operation` :returns: The latest status of the current operation. """ request_pb = operations_pb2.GetOperationReques...
[ "Polls", "the", "status", "of", "the", "current", "operation", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/core/google/cloud/operation.py#L199-L208
[ "def", "_get_operation_rpc", "(", "self", ")", ":", "request_pb", "=", "operations_pb2", ".", "GetOperationRequest", "(", "name", "=", "self", ".", "name", ")", "return", "self", ".", "client", ".", "_operations_stub", ".", "GetOperation", "(", "request_pb", "...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Operation._get_operation_http
Checks the status of the current operation. Uses HTTP request to check. :rtype: :class:`~google.longrunning.operations_pb2.Operation` :returns: The latest status of the current operation.
core/google/cloud/operation.py
def _get_operation_http(self): """Checks the status of the current operation. Uses HTTP request to check. :rtype: :class:`~google.longrunning.operations_pb2.Operation` :returns: The latest status of the current operation. """ path = "operations/%s" % (self.name,) ...
def _get_operation_http(self): """Checks the status of the current operation. Uses HTTP request to check. :rtype: :class:`~google.longrunning.operations_pb2.Operation` :returns: The latest status of the current operation. """ path = "operations/%s" % (self.name,) ...
[ "Checks", "the", "status", "of", "the", "current", "operation", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/core/google/cloud/operation.py#L210-L220
[ "def", "_get_operation_http", "(", "self", ")", ":", "path", "=", "\"operations/%s\"", "%", "(", "self", ".", "name", ",", ")", "api_response", "=", "self", ".", "client", ".", "_connection", ".", "api_request", "(", "method", "=", "\"GET\"", ",", "path", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Operation._update_state
Update the state of the current object based on operation. :type operation_pb: :class:`~google.longrunning.operations_pb2.Operation` :param operation_pb: Protobuf to be parsed.
core/google/cloud/operation.py
def _update_state(self, operation_pb): """Update the state of the current object based on operation. :type operation_pb: :class:`~google.longrunning.operations_pb2.Operation` :param operation_pb: Protobuf to be parsed. """ if operation_pb.done: self._comp...
def _update_state(self, operation_pb): """Update the state of the current object based on operation. :type operation_pb: :class:`~google.longrunning.operations_pb2.Operation` :param operation_pb: Protobuf to be parsed. """ if operation_pb.done: self._comp...
[ "Update", "the", "state", "of", "the", "current", "object", "based", "on", "operation", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/core/google/cloud/operation.py#L233-L250
[ "def", "_update_state", "(", "self", ",", "operation_pb", ")", ":", "if", "operation_pb", ".", "done", ":", "self", ".", "_complete", "=", "True", "if", "operation_pb", ".", "HasField", "(", "\"metadata\"", ")", ":", "self", ".", "metadata", "=", "_from_an...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Operation.poll
Check if the operation has finished. :rtype: bool :returns: A boolean indicating if the current operation has completed. :raises ValueError: if the operation has already completed.
core/google/cloud/operation.py
def poll(self): """Check if the operation has finished. :rtype: bool :returns: A boolean indicating if the current operation has completed. :raises ValueError: if the operation has already completed. """ if self.complete: raise ValueError("Th...
def poll(self): """Check if the operation has finished. :rtype: bool :returns: A boolean indicating if the current operation has completed. :raises ValueError: if the operation has already completed. """ if self.complete: raise ValueError("Th...
[ "Check", "if", "the", "operation", "has", "finished", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/core/google/cloud/operation.py#L252-L266
[ "def", "poll", "(", "self", ")", ":", "if", "self", ".", "complete", ":", "raise", "ValueError", "(", "\"The operation has completed.\"", ")", "operation_pb", "=", "self", ".", "_get_operation", "(", ")", "self", ".", "_update_state", "(", "operation_pb", ")",...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_parse_rmw_row_response
Parses the response to a ``ReadModifyWriteRow`` request. :type row_response: :class:`.data_v2_pb2.Row` :param row_response: The response row (with only modified cells) from a ``ReadModifyWriteRow`` request. :rtype: dict :returns: The new contents of all modified cells. Returne...
bigtable/google/cloud/bigtable/row.py
def _parse_rmw_row_response(row_response): """Parses the response to a ``ReadModifyWriteRow`` request. :type row_response: :class:`.data_v2_pb2.Row` :param row_response: The response row (with only modified cells) from a ``ReadModifyWriteRow`` request. :rtype: dict :return...
def _parse_rmw_row_response(row_response): """Parses the response to a ``ReadModifyWriteRow`` request. :type row_response: :class:`.data_v2_pb2.Row` :param row_response: The response row (with only modified cells) from a ``ReadModifyWriteRow`` request. :rtype: dict :return...
[ "Parses", "the", "response", "to", "a", "ReadModifyWriteRow", "request", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/row.py#L921-L958
[ "def", "_parse_rmw_row_response", "(", "row_response", ")", ":", "result", "=", "{", "}", "for", "column_family", "in", "row_response", ".", "row", ".", "families", ":", "column_family_id", ",", "curr_family", "=", "_parse_family_pb", "(", "column_family", ")", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_parse_family_pb
Parses a Family protobuf into a dictionary. :type family_pb: :class:`._generated.data_pb2.Family` :param family_pb: A protobuf :rtype: tuple :returns: A string and dictionary. The string is the name of the column family and the dictionary has column names (within the family...
bigtable/google/cloud/bigtable/row.py
def _parse_family_pb(family_pb): """Parses a Family protobuf into a dictionary. :type family_pb: :class:`._generated.data_pb2.Family` :param family_pb: A protobuf :rtype: tuple :returns: A string and dictionary. The string is the name of the column family and the dictionary has colum...
def _parse_family_pb(family_pb): """Parses a Family protobuf into a dictionary. :type family_pb: :class:`._generated.data_pb2.Family` :param family_pb: A protobuf :rtype: tuple :returns: A string and dictionary. The string is the name of the column family and the dictionary has colum...
[ "Parses", "a", "Family", "protobuf", "into", "a", "dictionary", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/row.py#L961-L993
[ "def", "_parse_family_pb", "(", "family_pb", ")", ":", "result", "=", "{", "}", "for", "column", "in", "family_pb", ".", "columns", ":", "result", "[", "column", ".", "qualifier", "]", "=", "cells", "=", "[", "]", "for", "cell", "in", "column", ".", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_SetDeleteRow._set_cell
Helper for :meth:`set_cell` Adds a mutation to set the value in a specific cell. ``state`` is unused by :class:`DirectRow` but is used by subclasses. :type column_family_id: str :param column_family_id: The column family that contains the column. ...
bigtable/google/cloud/bigtable/row.py
def _set_cell(self, column_family_id, column, value, timestamp=None, state=None): """Helper for :meth:`set_cell` Adds a mutation to set the value in a specific cell. ``state`` is unused by :class:`DirectRow` but is used by subclasses. :type column_family_id: str :param...
def _set_cell(self, column_family_id, column, value, timestamp=None, state=None): """Helper for :meth:`set_cell` Adds a mutation to set the value in a specific cell. ``state`` is unused by :class:`DirectRow` but is used by subclasses. :type column_family_id: str :param...
[ "Helper", "for", ":", "meth", ":", "set_cell" ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/row.py#L122-L170
[ "def", "_set_cell", "(", "self", ",", "column_family_id", ",", "column", ",", "value", ",", "timestamp", "=", "None", ",", "state", "=", "None", ")", ":", "column", "=", "_to_bytes", "(", "column", ")", "if", "isinstance", "(", "value", ",", "six", "."...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_SetDeleteRow._delete
Helper for :meth:`delete` Adds a delete mutation (for the entire row) to the accumulated mutations. ``state`` is unused by :class:`DirectRow` but is used by subclasses. :type state: bool :param state: (Optional) The state that is passed along to :...
bigtable/google/cloud/bigtable/row.py
def _delete(self, state=None): """Helper for :meth:`delete` Adds a delete mutation (for the entire row) to the accumulated mutations. ``state`` is unused by :class:`DirectRow` but is used by subclasses. :type state: bool :param state: (Optional) The state that ...
def _delete(self, state=None): """Helper for :meth:`delete` Adds a delete mutation (for the entire row) to the accumulated mutations. ``state`` is unused by :class:`DirectRow` but is used by subclasses. :type state: bool :param state: (Optional) The state that ...
[ "Helper", "for", ":", "meth", ":", "delete" ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/row.py#L172-L187
[ "def", "_delete", "(", "self", ",", "state", "=", "None", ")", ":", "mutation_val", "=", "data_v2_pb2", ".", "Mutation", ".", "DeleteFromRow", "(", ")", "mutation_pb", "=", "data_v2_pb2", ".", "Mutation", "(", "delete_from_row", "=", "mutation_val", ")", "se...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_SetDeleteRow._delete_cells
Helper for :meth:`delete_cell` and :meth:`delete_cells`. ``state`` is unused by :class:`DirectRow` but is used by subclasses. :type column_family_id: str :param column_family_id: The column family that contains the column or columns with cells being del...
bigtable/google/cloud/bigtable/row.py
def _delete_cells(self, column_family_id, columns, time_range=None, state=None): """Helper for :meth:`delete_cell` and :meth:`delete_cells`. ``state`` is unused by :class:`DirectRow` but is used by subclasses. :type column_family_id: str :param column_family_id: The column fami...
def _delete_cells(self, column_family_id, columns, time_range=None, state=None): """Helper for :meth:`delete_cell` and :meth:`delete_cells`. ``state`` is unused by :class:`DirectRow` but is used by subclasses. :type column_family_id: str :param column_family_id: The column fami...
[ "Helper", "for", ":", "meth", ":", "delete_cell", "and", ":", "meth", ":", "delete_cells", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/row.py#L189-L240
[ "def", "_delete_cells", "(", "self", ",", "column_family_id", ",", "columns", ",", "time_range", "=", "None", ",", "state", "=", "None", ")", ":", "mutations_list", "=", "self", ".", "_get_mutations", "(", "state", ")", "if", "columns", "is", "self", ".", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
DirectRow.get_mutations_size
Gets the total mutations size for current row For example: .. literalinclude:: snippets_table.py :start-after: [START bigtable_row_get_mutations_size] :end-before: [END bigtable_row_get_mutations_size]
bigtable/google/cloud/bigtable/row.py
def get_mutations_size(self): """ Gets the total mutations size for current row For example: .. literalinclude:: snippets_table.py :start-after: [START bigtable_row_get_mutations_size] :end-before: [END bigtable_row_get_mutations_size] """ mutation_siz...
def get_mutations_size(self): """ Gets the total mutations size for current row For example: .. literalinclude:: snippets_table.py :start-after: [START bigtable_row_get_mutations_size] :end-before: [END bigtable_row_get_mutations_size] """ mutation_siz...
[ "Gets", "the", "total", "mutations", "size", "for", "current", "row" ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/row.py#L295-L310
[ "def", "get_mutations_size", "(", "self", ")", ":", "mutation_size", "=", "0", "for", "mutation", "in", "self", ".", "_get_mutations", "(", ")", ":", "mutation_size", "+=", "mutation", ".", "ByteSize", "(", ")", "return", "mutation_size" ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
DirectRow.set_cell
Sets a value in this row. The cell is determined by the ``row_key`` of this :class:`DirectRow` and the ``column``. The ``column`` must be in an existing :class:`.ColumnFamily` (as determined by ``column_family_id``). .. note:: This method adds a mutation to the accumulated...
bigtable/google/cloud/bigtable/row.py
def set_cell(self, column_family_id, column, value, timestamp=None): """Sets a value in this row. The cell is determined by the ``row_key`` of this :class:`DirectRow` and the ``column``. The ``column`` must be in an existing :class:`.ColumnFamily` (as determined by ``column_family_id``)...
def set_cell(self, column_family_id, column, value, timestamp=None): """Sets a value in this row. The cell is determined by the ``row_key`` of this :class:`DirectRow` and the ``column``. The ``column`` must be in an existing :class:`.ColumnFamily` (as determined by ``column_family_id``)...
[ "Sets", "a", "value", "in", "this", "row", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/row.py#L312-L349
[ "def", "set_cell", "(", "self", ",", "column_family_id", ",", "column", ",", "value", ",", "timestamp", "=", "None", ")", ":", "self", ".", "_set_cell", "(", "column_family_id", ",", "column", ",", "value", ",", "timestamp", "=", "timestamp", ",", "state",...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
DirectRow.delete_cell
Deletes cell in this row. .. note:: This method adds a mutation to the accumulated mutations on this row, but does not make an API request. To actually send an API request (with the mutations) to the Google Cloud Bigtable API, call :meth:`commit`. For e...
bigtable/google/cloud/bigtable/row.py
def delete_cell(self, column_family_id, column, time_range=None): """Deletes cell in this row. .. note:: This method adds a mutation to the accumulated mutations on this row, but does not make an API request. To actually send an API request (with the mutations) to t...
def delete_cell(self, column_family_id, column, time_range=None): """Deletes cell in this row. .. note:: This method adds a mutation to the accumulated mutations on this row, but does not make an API request. To actually send an API request (with the mutations) to t...
[ "Deletes", "cell", "in", "this", "row", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/row.py#L370-L401
[ "def", "delete_cell", "(", "self", ",", "column_family_id", ",", "column", ",", "time_range", "=", "None", ")", ":", "self", ".", "_delete_cells", "(", "column_family_id", ",", "[", "column", "]", ",", "time_range", "=", "time_range", ",", "state", "=", "N...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
DirectRow.delete_cells
Deletes cells in this row. .. note:: This method adds a mutation to the accumulated mutations on this row, but does not make an API request. To actually send an API request (with the mutations) to the Google Cloud Bigtable API, call :meth:`commit`. For ...
bigtable/google/cloud/bigtable/row.py
def delete_cells(self, column_family_id, columns, time_range=None): """Deletes cells in this row. .. note:: This method adds a mutation to the accumulated mutations on this row, but does not make an API request. To actually send an API request (with the mutations) t...
def delete_cells(self, column_family_id, columns, time_range=None): """Deletes cells in this row. .. note:: This method adds a mutation to the accumulated mutations on this row, but does not make an API request. To actually send an API request (with the mutations) t...
[ "Deletes", "cells", "in", "this", "row", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/row.py#L403-L434
[ "def", "delete_cells", "(", "self", ",", "column_family_id", ",", "columns", ",", "time_range", "=", "None", ")", ":", "self", ".", "_delete_cells", "(", "column_family_id", ",", "columns", ",", "time_range", "=", "time_range", ",", "state", "=", "None", ")"...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
ConditionalRow.commit
Makes a ``CheckAndMutateRow`` API request. If no mutations have been created in the row, no request is made. The mutations will be applied conditionally, based on whether the filter matches any cells in the :class:`ConditionalRow` or not. (Each method which adds a mutation has a ``stat...
bigtable/google/cloud/bigtable/row.py
def commit(self): """Makes a ``CheckAndMutateRow`` API request. If no mutations have been created in the row, no request is made. The mutations will be applied conditionally, based on whether the filter matches any cells in the :class:`ConditionalRow` or not. (Each method which...
def commit(self): """Makes a ``CheckAndMutateRow`` API request. If no mutations have been created in the row, no request is made. The mutations will be applied conditionally, based on whether the filter matches any cells in the :class:`ConditionalRow` or not. (Each method which...
[ "Makes", "a", "CheckAndMutateRow", "API", "request", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/row.py#L538-L589
[ "def", "commit", "(", "self", ")", ":", "true_mutations", "=", "self", ".", "_get_mutations", "(", "state", "=", "True", ")", "false_mutations", "=", "self", ".", "_get_mutations", "(", "state", "=", "False", ")", "num_true_mutations", "=", "len", "(", "tr...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
AppendRow.append_cell_value
Appends a value to an existing cell. .. note:: This method adds a read-modify rule protobuf to the accumulated read-modify rules on this row, but does not make an API request. To actually send an API request (with the rules) to the Google Cloud Bigtable API, cal...
bigtable/google/cloud/bigtable/row.py
def append_cell_value(self, column_family_id, column, value): """Appends a value to an existing cell. .. note:: This method adds a read-modify rule protobuf to the accumulated read-modify rules on this row, but does not make an API request. To actually send an API r...
def append_cell_value(self, column_family_id, column, value): """Appends a value to an existing cell. .. note:: This method adds a read-modify rule protobuf to the accumulated read-modify rules on this row, but does not make an API request. To actually send an API r...
[ "Appends", "a", "value", "to", "an", "existing", "cell", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/row.py#L789-L824
[ "def", "append_cell_value", "(", "self", ",", "column_family_id", ",", "column", ",", "value", ")", ":", "column", "=", "_to_bytes", "(", "column", ")", "value", "=", "_to_bytes", "(", "value", ")", "rule_pb", "=", "data_v2_pb2", ".", "ReadModifyWriteRule", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
AppendRow.increment_cell_value
Increments a value in an existing cell. Assumes the value in the cell is stored as a 64 bit integer serialized to bytes. .. note:: This method adds a read-modify rule protobuf to the accumulated read-modify rules on this row, but does not make an API reques...
bigtable/google/cloud/bigtable/row.py
def increment_cell_value(self, column_family_id, column, int_value): """Increments a value in an existing cell. Assumes the value in the cell is stored as a 64 bit integer serialized to bytes. .. note:: This method adds a read-modify rule protobuf to the accumulated ...
def increment_cell_value(self, column_family_id, column, int_value): """Increments a value in an existing cell. Assumes the value in the cell is stored as a 64 bit integer serialized to bytes. .. note:: This method adds a read-modify rule protobuf to the accumulated ...
[ "Increments", "a", "value", "in", "an", "existing", "cell", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/row.py#L826-L868
[ "def", "increment_cell_value", "(", "self", ",", "column_family_id", ",", "column", ",", "int_value", ")", ":", "column", "=", "_to_bytes", "(", "column", ")", "rule_pb", "=", "data_v2_pb2", ".", "ReadModifyWriteRule", "(", "family_name", "=", "column_family_id", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
AppendRow.commit
Makes a ``ReadModifyWriteRow`` API request. This commits modifications made by :meth:`append_cell_value` and :meth:`increment_cell_value`. If no modifications were made, makes no API request and just returns ``{}``. Modifies a row atomically, reading the latest existing timesta...
bigtable/google/cloud/bigtable/row.py
def commit(self): """Makes a ``ReadModifyWriteRow`` API request. This commits modifications made by :meth:`append_cell_value` and :meth:`increment_cell_value`. If no modifications were made, makes no API request and just returns ``{}``. Modifies a row atomically, reading the la...
def commit(self): """Makes a ``ReadModifyWriteRow`` API request. This commits modifications made by :meth:`append_cell_value` and :meth:`increment_cell_value`. If no modifications were made, makes no API request and just returns ``{}``. Modifies a row atomically, reading the la...
[ "Makes", "a", "ReadModifyWriteRow", "API", "request", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/row.py#L870-L918
[ "def", "commit", "(", "self", ")", ":", "num_mutations", "=", "len", "(", "self", ".", "_rule_pb_list", ")", "if", "num_mutations", "==", "0", ":", "return", "{", "}", "if", "num_mutations", ">", "MAX_MUTATIONS", ":", "raise", "ValueError", "(", "\"%d tota...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_retry_from_retry_config
Creates a Retry object given a gapic retry configuration. Args: retry_params (dict): The retry parameter values, for example:: { "initial_retry_delay_millis": 1000, "retry_delay_multiplier": 2.5, "max_retry_delay_millis": 120000, ...
api_core/google/api_core/gapic_v1/config.py
def _retry_from_retry_config(retry_params, retry_codes): """Creates a Retry object given a gapic retry configuration. Args: retry_params (dict): The retry parameter values, for example:: { "initial_retry_delay_millis": 1000, "retry_delay_multiplier": 2.5, ...
def _retry_from_retry_config(retry_params, retry_codes): """Creates a Retry object given a gapic retry configuration. Args: retry_params (dict): The retry parameter values, for example:: { "initial_retry_delay_millis": 1000, "retry_delay_multiplier": 2.5, ...
[ "Creates", "a", "Retry", "object", "given", "a", "gapic", "retry", "configuration", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/api_core/google/api_core/gapic_v1/config.py#L48-L79
[ "def", "_retry_from_retry_config", "(", "retry_params", ",", "retry_codes", ")", ":", "exception_classes", "=", "[", "_exception_class_for_grpc_status_name", "(", "code", ")", "for", "code", "in", "retry_codes", "]", "return", "retry", ".", "Retry", "(", "retry", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_timeout_from_retry_config
Creates a ExponentialTimeout object given a gapic retry configuration. Args: retry_params (dict): The retry parameter values, for example:: { "initial_retry_delay_millis": 1000, "retry_delay_multiplier": 2.5, "max_retry_delay_millis": 120000, ...
api_core/google/api_core/gapic_v1/config.py
def _timeout_from_retry_config(retry_params): """Creates a ExponentialTimeout object given a gapic retry configuration. Args: retry_params (dict): The retry parameter values, for example:: { "initial_retry_delay_millis": 1000, "retry_delay_multiplier": 2.5, ...
def _timeout_from_retry_config(retry_params): """Creates a ExponentialTimeout object given a gapic retry configuration. Args: retry_params (dict): The retry parameter values, for example:: { "initial_retry_delay_millis": 1000, "retry_delay_multiplier": 2.5, ...
[ "Creates", "a", "ExponentialTimeout", "object", "given", "a", "gapic", "retry", "configuration", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/api_core/google/api_core/gapic_v1/config.py#L82-L107
[ "def", "_timeout_from_retry_config", "(", "retry_params", ")", ":", "return", "timeout", ".", "ExponentialTimeout", "(", "initial", "=", "(", "retry_params", "[", "\"initial_rpc_timeout_millis\"", "]", "/", "_MILLIS_PER_SECOND", ")", ",", "maximum", "=", "(", "retry...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
parse_method_configs
Creates default retry and timeout objects for each method in a gapic interface config. Args: interface_config (Mapping): The interface config section of the full gapic library config. For example, If the full configuration has an interface named ``google.example.v1.ExampleServic...
api_core/google/api_core/gapic_v1/config.py
def parse_method_configs(interface_config): """Creates default retry and timeout objects for each method in a gapic interface config. Args: interface_config (Mapping): The interface config section of the full gapic library config. For example, If the full configuration has a...
def parse_method_configs(interface_config): """Creates default retry and timeout objects for each method in a gapic interface config. Args: interface_config (Mapping): The interface config section of the full gapic library config. For example, If the full configuration has a...
[ "Creates", "default", "retry", "and", "timeout", "objects", "for", "each", "method", "in", "a", "gapic", "interface", "config", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/api_core/google/api_core/gapic_v1/config.py#L113-L167
[ "def", "parse_method_configs", "(", "interface_config", ")", ":", "# Grab all the retry codes", "retry_codes_map", "=", "{", "name", ":", "retry_codes", "for", "name", ",", "retry_codes", "in", "six", ".", "iteritems", "(", "interface_config", ".", "get", "(", "\"...
85e80125a59cb10f8cb105f25ecc099e4b940b50