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
BigtableClient.mutate_rows
Mutates multiple rows in a batch. Each individual row is mutated atomically as in MutateRow, but the entire batch is not executed atomically. Example: >>> from google.cloud import bigtable_v2 >>> >>> client = bigtable_v2.BigtableClient() >>> ...
bigtable/google/cloud/bigtable_v2/gapic/bigtable_client.py
def mutate_rows( self, table_name, entries, app_profile_id=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Mutates multiple rows in a batch. Each individual row is muta...
def mutate_rows( self, table_name, entries, app_profile_id=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Mutates multiple rows in a batch. Each individual row is muta...
[ "Mutates", "multiple", "rows", "in", "a", "batch", ".", "Each", "individual", "row", "is", "mutated", "atomically", "as", "in", "MutateRow", "but", "the", "entire", "batch", "is", "not", "executed", "atomically", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable_v2/gapic/bigtable_client.py#L452-L540
[ "def", "mutate_rows", "(", "self", ",", "table_name", ",", "entries", ",", "app_profile_id", "=", "None", ",", "retry", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "method", ".", "DEFAULT", ",", "timeout", "=", "google", ".", "api_core", ".", "...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
BigtableClient.check_and_mutate_row
Mutates a row atomically based on the output of a predicate Reader filter. Example: >>> from google.cloud import bigtable_v2 >>> >>> client = bigtable_v2.BigtableClient() >>> >>> table_name = client.table_path('[PROJECT]', '[INSTANCE]', '[TABLE]') ...
bigtable/google/cloud/bigtable_v2/gapic/bigtable_client.py
def check_and_mutate_row( self, table_name, row_key, app_profile_id=None, predicate_filter=None, true_mutations=None, false_mutations=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, meta...
def check_and_mutate_row( self, table_name, row_key, app_profile_id=None, predicate_filter=None, true_mutations=None, false_mutations=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, meta...
[ "Mutates", "a", "row", "atomically", "based", "on", "the", "output", "of", "a", "predicate", "Reader", "filter", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable_v2/gapic/bigtable_client.py#L542-L652
[ "def", "check_and_mutate_row", "(", "self", ",", "table_name", ",", "row_key", ",", "app_profile_id", "=", "None", ",", "predicate_filter", "=", "None", ",", "true_mutations", "=", "None", ",", "false_mutations", "=", "None", ",", "retry", "=", "google", ".", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Instance._update_from_pb
Refresh self from the server-provided protobuf. Helper for :meth:`from_pb` and :meth:`reload`.
bigtable/google/cloud/bigtable/instance.py
def _update_from_pb(self, instance_pb): """Refresh self from the server-provided protobuf. Helper for :meth:`from_pb` and :meth:`reload`. """ if not instance_pb.display_name: # Simple field (string) raise ValueError("Instance protobuf does not contain display_name") ...
def _update_from_pb(self, instance_pb): """Refresh self from the server-provided protobuf. Helper for :meth:`from_pb` and :meth:`reload`. """ if not instance_pb.display_name: # Simple field (string) raise ValueError("Instance protobuf does not contain display_name") ...
[ "Refresh", "self", "from", "the", "server", "-", "provided", "protobuf", ".", "Helper", "for", ":", "meth", ":", "from_pb", "and", ":", "meth", ":", "reload", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/instance.py#L118-L127
[ "def", "_update_from_pb", "(", "self", ",", "instance_pb", ")", ":", "if", "not", "instance_pb", ".", "display_name", ":", "# Simple field (string)", "raise", "ValueError", "(", "\"Instance protobuf does not contain display_name\"", ")", "self", ".", "display_name", "="...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Instance.name
Instance name used in requests. .. note:: This property will not change if ``instance_id`` does not, but the return value is not cached. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_instance_name] :end-before: [END bigt...
bigtable/google/cloud/bigtable/instance.py
def name(self): """Instance name used in requests. .. note:: This property will not change if ``instance_id`` does not, but the return value is not cached. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_instance_name] ...
def name(self): """Instance name used in requests. .. note:: This property will not change if ``instance_id`` does not, but the return value is not cached. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_instance_name] ...
[ "Instance", "name", "used", "in", "requests", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/instance.py#L170-L192
[ "def", "name", "(", "self", ")", ":", "return", "self", ".", "_client", ".", "instance_admin_client", ".", "instance_path", "(", "project", "=", "self", ".", "_client", ".", "project", ",", "instance", "=", "self", ".", "instance_id", ")" ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Instance.create
Create this instance. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_create_prod_instance] :end-before: [END bigtable_create_prod_instance] .. note:: Uses the ``project`` and ``instance_id`` on the current :class:`In...
bigtable/google/cloud/bigtable/instance.py
def create( self, location_id=None, serve_nodes=None, default_storage_type=None, clusters=None, ): """Create this instance. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_create_prod_instance] :end-...
def create( self, location_id=None, serve_nodes=None, default_storage_type=None, clusters=None, ): """Create this instance. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_create_prod_instance] :end-...
[ "Create", "this", "instance", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/instance.py#L221-L325
[ "def", "create", "(", "self", ",", "location_id", "=", "None", ",", "serve_nodes", "=", "None", ",", "default_storage_type", "=", "None", ",", "clusters", "=", "None", ",", ")", ":", "if", "clusters", "is", "None", ":", "warnings", ".", "warn", "(", "_...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Instance.exists
Check whether the instance already exists. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_check_instance_exists] :end-before: [END bigtable_check_instance_exists] :rtype: bool :returns: True if the table exists, else False.
bigtable/google/cloud/bigtable/instance.py
def exists(self): """Check whether the instance already exists. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_check_instance_exists] :end-before: [END bigtable_check_instance_exists] :rtype: bool :returns: True if the table ...
def exists(self): """Check whether the instance already exists. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_check_instance_exists] :end-before: [END bigtable_check_instance_exists] :rtype: bool :returns: True if the table ...
[ "Check", "whether", "the", "instance", "already", "exists", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/instance.py#L327-L344
[ "def", "exists", "(", "self", ")", ":", "try", ":", "self", ".", "_client", ".", "instance_admin_client", ".", "get_instance", "(", "name", "=", "self", ".", "name", ")", "return", "True", "# NOTE: There could be other exceptions that are returned to the user.", "ex...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Instance.reload
Reload the metadata for this instance. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_reload_instance] :end-before: [END bigtable_reload_instance]
bigtable/google/cloud/bigtable/instance.py
def reload(self): """Reload the metadata for this instance. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_reload_instance] :end-before: [END bigtable_reload_instance] """ instance_pb = self._client.instance_admin_client.get_i...
def reload(self): """Reload the metadata for this instance. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_reload_instance] :end-before: [END bigtable_reload_instance] """ instance_pb = self._client.instance_admin_client.get_i...
[ "Reload", "the", "metadata", "for", "this", "instance", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/instance.py#L346-L359
[ "def", "reload", "(", "self", ")", ":", "instance_pb", "=", "self", ".", "_client", ".", "instance_admin_client", ".", "get_instance", "(", "self", ".", "name", ")", "# NOTE: _update_from_pb does not check that the project and", "# instance ID on the response match th...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Instance.update
Updates an instance within a project. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_update_instance] :end-before: [END bigtable_update_instance] .. note:: Updates any or all of the following values: ``display_name``...
bigtable/google/cloud/bigtable/instance.py
def update(self): """Updates an instance within a project. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_update_instance] :end-before: [END bigtable_update_instance] .. note:: Updates any or all of the following values:...
def update(self): """Updates an instance within a project. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_update_instance] :end-before: [END bigtable_update_instance] .. note:: Updates any or all of the following values:...
[ "Updates", "an", "instance", "within", "a", "project", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/instance.py#L361-L405
[ "def", "update", "(", "self", ")", ":", "update_mask_pb", "=", "field_mask_pb2", ".", "FieldMask", "(", ")", "if", "self", ".", "display_name", "is", "not", "None", ":", "update_mask_pb", ".", "paths", ".", "append", "(", "\"display_name\"", ")", "if", "se...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Instance.get_iam_policy
Gets the access control policy for an instance resource. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_get_iam_policy] :end-before: [END bigtable_get_iam_policy] :rtype: :class:`google.cloud.bigtable.policy.Policy` :returns: The cur...
bigtable/google/cloud/bigtable/instance.py
def get_iam_policy(self): """Gets the access control policy for an instance resource. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_get_iam_policy] :end-before: [END bigtable_get_iam_policy] :rtype: :class:`google.cloud.bigtable.pol...
def get_iam_policy(self): """Gets the access control policy for an instance resource. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_get_iam_policy] :end-before: [END bigtable_get_iam_policy] :rtype: :class:`google.cloud.bigtable.pol...
[ "Gets", "the", "access", "control", "policy", "for", "an", "instance", "resource", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/instance.py#L437-L451
[ "def", "get_iam_policy", "(", "self", ")", ":", "instance_admin_client", "=", "self", ".", "_client", ".", "instance_admin_client", "resp", "=", "instance_admin_client", ".", "get_iam_policy", "(", "resource", "=", "self", ".", "name", ")", "return", "Policy", "...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Instance.set_iam_policy
Sets the access control policy on an instance resource. Replaces any existing policy. For more information about policy, please see documentation of class `google.cloud.bigtable.policy.Policy` For example: .. literalinclude:: snippets.py :start-after: [START bigtab...
bigtable/google/cloud/bigtable/instance.py
def set_iam_policy(self, policy): """Sets the access control policy on an instance resource. Replaces any existing policy. For more information about policy, please see documentation of class `google.cloud.bigtable.policy.Policy` For example: .. literalinclude:: snippe...
def set_iam_policy(self, policy): """Sets the access control policy on an instance resource. Replaces any existing policy. For more information about policy, please see documentation of class `google.cloud.bigtable.policy.Policy` For example: .. literalinclude:: snippe...
[ "Sets", "the", "access", "control", "policy", "on", "an", "instance", "resource", ".", "Replaces", "any", "existing", "policy", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/instance.py#L453-L477
[ "def", "set_iam_policy", "(", "self", ",", "policy", ")", ":", "instance_admin_client", "=", "self", ".", "_client", ".", "instance_admin_client", "resp", "=", "instance_admin_client", ".", "set_iam_policy", "(", "resource", "=", "self", ".", "name", ",", "polic...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Instance.cluster
Factory to create a cluster associated with this instance. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_create_cluster] :end-before: [END bigtable_create_cluster] :type cluster_id: str :param cluster_id: The ID of the cluster. ...
bigtable/google/cloud/bigtable/instance.py
def cluster( self, cluster_id, location_id=None, serve_nodes=None, default_storage_type=None ): """Factory to create a cluster associated with this instance. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_create_cluster] :end-befo...
def cluster( self, cluster_id, location_id=None, serve_nodes=None, default_storage_type=None ): """Factory to create a cluster associated with this instance. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_create_cluster] :end-befo...
[ "Factory", "to", "create", "a", "cluster", "associated", "with", "this", "instance", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/instance.py#L507-L553
[ "def", "cluster", "(", "self", ",", "cluster_id", ",", "location_id", "=", "None", ",", "serve_nodes", "=", "None", ",", "default_storage_type", "=", "None", ")", ":", "return", "Cluster", "(", "cluster_id", ",", "self", ",", "location_id", "=", "location_id...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Instance.list_clusters
List the clusters in this instance. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_list_clusters_on_instance] :end-before: [END bigtable_list_clusters_on_instance] :rtype: tuple :returns: (clusters, failed_locations), whe...
bigtable/google/cloud/bigtable/instance.py
def list_clusters(self): """List the clusters in this instance. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_list_clusters_on_instance] :end-before: [END bigtable_list_clusters_on_instance] :rtype: tuple :returns: ...
def list_clusters(self): """List the clusters in this instance. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_list_clusters_on_instance] :end-before: [END bigtable_list_clusters_on_instance] :rtype: tuple :returns: ...
[ "List", "the", "clusters", "in", "this", "instance", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/instance.py#L555-L573
[ "def", "list_clusters", "(", "self", ")", ":", "resp", "=", "self", ".", "_client", ".", "instance_admin_client", ".", "list_clusters", "(", "self", ".", "name", ")", "clusters", "=", "[", "Cluster", ".", "from_pb", "(", "cluster", ",", "self", ")", "for...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Instance.table
Factory to create a table associated with this instance. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_create_table] :end-before: [END bigtable_create_table] :type table_id: str :param table_id: The ID of the table. :type a...
bigtable/google/cloud/bigtable/instance.py
def table(self, table_id, mutation_timeout=None, app_profile_id=None): """Factory to create a table associated with this instance. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_create_table] :end-before: [END bigtable_create_table] ...
def table(self, table_id, mutation_timeout=None, app_profile_id=None): """Factory to create a table associated with this instance. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_create_table] :end-before: [END bigtable_create_table] ...
[ "Factory", "to", "create", "a", "table", "associated", "with", "this", "instance", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/instance.py#L575-L598
[ "def", "table", "(", "self", ",", "table_id", ",", "mutation_timeout", "=", "None", ",", "app_profile_id", "=", "None", ")", ":", "return", "Table", "(", "table_id", ",", "self", ",", "app_profile_id", "=", "app_profile_id", ",", "mutation_timeout", "=", "mu...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Instance.list_tables
List the tables in this instance. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_list_tables] :end-before: [END bigtable_list_tables] :rtype: list of :class:`Table <google.cloud.bigtable.table.Table>` :returns: The list of tables own...
bigtable/google/cloud/bigtable/instance.py
def list_tables(self): """List the tables in this instance. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_list_tables] :end-before: [END bigtable_list_tables] :rtype: list of :class:`Table <google.cloud.bigtable.table.Table>` ...
def list_tables(self): """List the tables in this instance. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_list_tables] :end-before: [END bigtable_list_tables] :rtype: list of :class:`Table <google.cloud.bigtable.table.Table>` ...
[ "List", "the", "tables", "in", "this", "instance", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/instance.py#L600-L626
[ "def", "list_tables", "(", "self", ")", ":", "table_list_pb", "=", "self", ".", "_client", ".", "table_admin_client", ".", "list_tables", "(", "self", ".", "name", ")", "result", "=", "[", "]", "for", "table_pb", "in", "table_list_pb", ":", "table_prefix", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Instance.app_profile
Factory to create AppProfile associated with this instance. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_create_app_profile] :end-before: [END bigtable_create_app_profile] :type app_profile_id: str :param app_profile_id: The ID of ...
bigtable/google/cloud/bigtable/instance.py
def app_profile( self, app_profile_id, routing_policy_type=None, description=None, cluster_id=None, allow_transactional_writes=None, ): """Factory to create AppProfile associated with this instance. For example: .. literalinclude:: snippets.p...
def app_profile( self, app_profile_id, routing_policy_type=None, description=None, cluster_id=None, allow_transactional_writes=None, ): """Factory to create AppProfile associated with this instance. For example: .. literalinclude:: snippets.p...
[ "Factory", "to", "create", "AppProfile", "associated", "with", "this", "instance", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/instance.py#L628-L679
[ "def", "app_profile", "(", "self", ",", "app_profile_id", ",", "routing_policy_type", "=", "None", ",", "description", "=", "None", ",", "cluster_id", "=", "None", ",", "allow_transactional_writes", "=", "None", ",", ")", ":", "return", "AppProfile", "(", "app...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Instance.list_app_profiles
Lists information about AppProfiles in an instance. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_list_app_profiles] :end-before: [END bigtable_list_app_profiles] :rtype: :list:[`~google.cloud.bigtable.app_profile.AppProfile`] :retu...
bigtable/google/cloud/bigtable/instance.py
def list_app_profiles(self): """Lists information about AppProfiles in an instance. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_list_app_profiles] :end-before: [END bigtable_list_app_profiles] :rtype: :list:[`~google.cloud.bigtabl...
def list_app_profiles(self): """Lists information about AppProfiles in an instance. For example: .. literalinclude:: snippets.py :start-after: [START bigtable_list_app_profiles] :end-before: [END bigtable_list_app_profiles] :rtype: :list:[`~google.cloud.bigtabl...
[ "Lists", "information", "about", "AppProfiles", "in", "an", "instance", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/google/cloud/bigtable/instance.py#L681-L697
[ "def", "list_app_profiles", "(", "self", ")", ":", "resp", "=", "self", ".", "_client", ".", "instance_admin_client", ".", "list_app_profiles", "(", "self", ".", "name", ")", "return", "[", "AppProfile", ".", "from_pb", "(", "app_profile", ",", "self", ")", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
system
Run the system test suite.
bigtable/noxfile.py
def system(session): """Run the system test suite.""" system_test_path = os.path.join("tests", "system.py") system_test_folder_path = os.path.join("tests", "system") # Sanity check: Only run tests if the environment variable is set. if not os.environ.get("GOOGLE_APPLICATION_CREDENTIALS", ""): ...
def system(session): """Run the system test suite.""" system_test_path = os.path.join("tests", "system.py") system_test_folder_path = os.path.join("tests", "system") # Sanity check: Only run tests if the environment variable is set. if not os.environ.get("GOOGLE_APPLICATION_CREDENTIALS", ""): ...
[ "Run", "the", "system", "test", "suite", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigtable/noxfile.py#L94-L123
[ "def", "system", "(", "session", ")", ":", "system_test_path", "=", "os", ".", "path", ".", "join", "(", "\"tests\"", ",", "\"system.py\"", ")", "system_test_folder_path", "=", "os", ".", "path", ".", "join", "(", "\"tests\"", ",", "\"system\"", ")", "# Sa...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_reference_getter
A :class:`~google.cloud.bigquery.table.TableReference` pointing to this table. Returns: google.cloud.bigquery.table.TableReference: pointer to this table.
bigquery/google/cloud/bigquery/table.py
def _reference_getter(table): """A :class:`~google.cloud.bigquery.table.TableReference` pointing to this table. Returns: google.cloud.bigquery.table.TableReference: pointer to this table. """ from google.cloud.bigquery import dataset dataset_ref = dataset.DatasetReference(table.project...
def _reference_getter(table): """A :class:`~google.cloud.bigquery.table.TableReference` pointing to this table. Returns: google.cloud.bigquery.table.TableReference: pointer to this table. """ from google.cloud.bigquery import dataset dataset_ref = dataset.DatasetReference(table.project...
[ "A", ":", "class", ":", "~google", ".", "cloud", ".", "bigquery", ".", "table", ".", "TableReference", "pointing", "to", "this", "table", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/table.py#L80-L90
[ "def", "_reference_getter", "(", "table", ")", ":", "from", "google", ".", "cloud", ".", "bigquery", "import", "dataset", "dataset_ref", "=", "dataset", ".", "DatasetReference", "(", "table", ".", "project", ",", "table", ".", "dataset_id", ")", "return", "T...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_view_use_legacy_sql_getter
bool: Specifies whether to execute the view with Legacy or Standard SQL. This boolean specifies whether to execute the view with Legacy SQL (:data:`True`) or Standard SQL (:data:`False`). The client side default is :data:`False`. The server-side default is :data:`True`. If this table is not a view, :da...
bigquery/google/cloud/bigquery/table.py
def _view_use_legacy_sql_getter(table): """bool: Specifies whether to execute the view with Legacy or Standard SQL. This boolean specifies whether to execute the view with Legacy SQL (:data:`True`) or Standard SQL (:data:`False`). The client side default is :data:`False`. The server-side default is :da...
def _view_use_legacy_sql_getter(table): """bool: Specifies whether to execute the view with Legacy or Standard SQL. This boolean specifies whether to execute the view with Legacy SQL (:data:`True`) or Standard SQL (:data:`False`). The client side default is :data:`False`. The server-side default is :da...
[ "bool", ":", "Specifies", "whether", "to", "execute", "the", "view", "with", "Legacy", "or", "Standard", "SQL", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/table.py#L93-L112
[ "def", "_view_use_legacy_sql_getter", "(", "table", ")", ":", "view", "=", "table", ".", "_properties", ".", "get", "(", "\"view\"", ")", "if", "view", "is", "not", "None", ":", "# The server-side default for useLegacySql is True.", "return", "view", ".", "get", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_row_from_mapping
Convert a mapping to a row tuple using the schema. Args: mapping (Dict[str, object]) Mapping of row data: must contain keys for all required fields in the schema. Keys which do not correspond to a field in the schema are ignored. schema (List[google.cloud.bigquer...
bigquery/google/cloud/bigquery/table.py
def _row_from_mapping(mapping, schema): """Convert a mapping to a row tuple using the schema. Args: mapping (Dict[str, object]) Mapping of row data: must contain keys for all required fields in the schema. Keys which do not correspond to a field in the schema are ign...
def _row_from_mapping(mapping, schema): """Convert a mapping to a row tuple using the schema. Args: mapping (Dict[str, object]) Mapping of row data: must contain keys for all required fields in the schema. Keys which do not correspond to a field in the schema are ign...
[ "Convert", "a", "mapping", "to", "a", "row", "tuple", "using", "the", "schema", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/table.py#L1105-L1136
[ "def", "_row_from_mapping", "(", "mapping", ",", "schema", ")", ":", "if", "len", "(", "schema", ")", "==", "0", ":", "raise", "ValueError", "(", "_TABLE_HAS_NO_SCHEMA", ")", "row", "=", "[", "]", "for", "field", "in", "schema", ":", "if", "field", "."...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_item_to_row
Convert a JSON row to the native object. .. note:: This assumes that the ``schema`` attribute has been added to the iterator after being created, which should be done by the caller. :type iterator: :class:`~google.api_core.page_iterator.Iterator` :param iterator: The iterator that...
bigquery/google/cloud/bigquery/table.py
def _item_to_row(iterator, resource): """Convert a JSON row to the native object. .. note:: This assumes that the ``schema`` attribute has been added to the iterator after being created, which should be done by the caller. :type iterator: :class:`~google.api_core.page_iterator.Ite...
def _item_to_row(iterator, resource): """Convert a JSON row to the native object. .. note:: This assumes that the ``schema`` attribute has been added to the iterator after being created, which should be done by the caller. :type iterator: :class:`~google.api_core.page_iterator.Ite...
[ "Convert", "a", "JSON", "row", "to", "the", "native", "object", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/table.py#L1882-L1903
[ "def", "_item_to_row", "(", "iterator", ",", "resource", ")", ":", "return", "Row", "(", "_helpers", ".", "_row_tuple_from_json", "(", "resource", ",", "iterator", ".", "schema", ")", ",", "iterator", ".", "_field_to_index", ",", ")" ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_rows_page_start
Grab total rows when :class:`~google.cloud.iterator.Page` starts. :type iterator: :class:`~google.api_core.page_iterator.Iterator` :param iterator: The iterator that is currently in use. :type page: :class:`~google.api_core.page_iterator.Page` :param page: The page that was just created. :type re...
bigquery/google/cloud/bigquery/table.py
def _rows_page_start(iterator, page, response): """Grab total rows when :class:`~google.cloud.iterator.Page` starts. :type iterator: :class:`~google.api_core.page_iterator.Iterator` :param iterator: The iterator that is currently in use. :type page: :class:`~google.api_core.page_iterator.Page` :pa...
def _rows_page_start(iterator, page, response): """Grab total rows when :class:`~google.cloud.iterator.Page` starts. :type iterator: :class:`~google.api_core.page_iterator.Iterator` :param iterator: The iterator that is currently in use. :type page: :class:`~google.api_core.page_iterator.Page` :pa...
[ "Grab", "total", "rows", "when", ":", "class", ":", "~google", ".", "cloud", ".", "iterator", ".", "Page", "starts", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/table.py#L1907-L1922
[ "def", "_rows_page_start", "(", "iterator", ",", "page", ",", "response", ")", ":", "total_rows", "=", "response", ".", "get", "(", "\"totalRows\"", ")", "if", "total_rows", "is", "not", "None", ":", "total_rows", "=", "int", "(", "total_rows", ")", "itera...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_table_arg_to_table_ref
Helper to convert a string or Table to TableReference. This function keeps TableReference and other kinds of objects unchanged.
bigquery/google/cloud/bigquery/table.py
def _table_arg_to_table_ref(value, default_project=None): """Helper to convert a string or Table to TableReference. This function keeps TableReference and other kinds of objects unchanged. """ if isinstance(value, six.string_types): value = TableReference.from_string(value, default_project=defa...
def _table_arg_to_table_ref(value, default_project=None): """Helper to convert a string or Table to TableReference. This function keeps TableReference and other kinds of objects unchanged. """ if isinstance(value, six.string_types): value = TableReference.from_string(value, default_project=defa...
[ "Helper", "to", "convert", "a", "string", "or", "Table", "to", "TableReference", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/table.py#L1928-L1937
[ "def", "_table_arg_to_table_ref", "(", "value", ",", "default_project", "=", "None", ")", ":", "if", "isinstance", "(", "value", ",", "six", ".", "string_types", ")", ":", "value", "=", "TableReference", ".", "from_string", "(", "value", ",", "default_project"...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_table_arg_to_table
Helper to convert a string or TableReference to a Table. This function keeps Table and other kinds of objects unchanged.
bigquery/google/cloud/bigquery/table.py
def _table_arg_to_table(value, default_project=None): """Helper to convert a string or TableReference to a Table. This function keeps Table and other kinds of objects unchanged. """ if isinstance(value, six.string_types): value = TableReference.from_string(value, default_project=default_project...
def _table_arg_to_table(value, default_project=None): """Helper to convert a string or TableReference to a Table. This function keeps Table and other kinds of objects unchanged. """ if isinstance(value, six.string_types): value = TableReference.from_string(value, default_project=default_project...
[ "Helper", "to", "convert", "a", "string", "or", "TableReference", "to", "a", "Table", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/table.py#L1940-L1954
[ "def", "_table_arg_to_table", "(", "value", ",", "default_project", "=", "None", ")", ":", "if", "isinstance", "(", "value", ",", "six", ".", "string_types", ")", ":", "value", "=", "TableReference", ".", "from_string", "(", "value", ",", "default_project", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
TableReference.from_string
Construct a table reference from table ID string. Args: table_id (str): A table ID in standard SQL format. If ``default_project`` is not specified, this must included a project ID, dataset ID, and table ID, each separated by ``.``. default...
bigquery/google/cloud/bigquery/table.py
def from_string(cls, table_id, default_project=None): """Construct a table reference from table ID string. Args: table_id (str): A table ID in standard SQL format. If ``default_project`` is not specified, this must included a project ID, dataset ...
def from_string(cls, table_id, default_project=None): """Construct a table reference from table ID string. Args: table_id (str): A table ID in standard SQL format. If ``default_project`` is not specified, this must included a project ID, dataset ...
[ "Construct", "a", "table", "reference", "from", "table", "ID", "string", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/table.py#L224-L260
[ "def", "from_string", "(", "cls", ",", "table_id", ",", "default_project", "=", "None", ")", ":", "from", "google", ".", "cloud", ".", "bigquery", ".", "dataset", "import", "DatasetReference", "(", "output_project_id", ",", "output_dataset_id", ",", "output_tabl...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
TableReference.from_api_repr
Factory: construct a table reference given its API representation Args: resource (Dict[str, object]): Table reference representation returned from the API Returns: google.cloud.bigquery.table.TableReference: Table reference parsed from ``resourc...
bigquery/google/cloud/bigquery/table.py
def from_api_repr(cls, resource): """Factory: construct a table reference given its API representation Args: resource (Dict[str, object]): Table reference representation returned from the API Returns: google.cloud.bigquery.table.TableReference: ...
def from_api_repr(cls, resource): """Factory: construct a table reference given its API representation Args: resource (Dict[str, object]): Table reference representation returned from the API Returns: google.cloud.bigquery.table.TableReference: ...
[ "Factory", ":", "construct", "a", "table", "reference", "given", "its", "API", "representation" ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/table.py#L263-L279
[ "def", "from_api_repr", "(", "cls", ",", "resource", ")", ":", "from", "google", ".", "cloud", ".", "bigquery", ".", "dataset", "import", "DatasetReference", "project", "=", "resource", "[", "\"projectId\"", "]", "dataset_id", "=", "resource", "[", "\"datasetI...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
TableReference.to_bqstorage
Construct a BigQuery Storage API representation of this table. Install the ``google-cloud-bigquery-storage`` package to use this feature. If the ``table_id`` contains a partition identifier (e.g. ``my_table$201812``) or a snapshot identifier (e.g. ``mytable@1234567890``), it is...
bigquery/google/cloud/bigquery/table.py
def to_bqstorage(self): """Construct a BigQuery Storage API representation of this table. Install the ``google-cloud-bigquery-storage`` package to use this feature. If the ``table_id`` contains a partition identifier (e.g. ``my_table$201812``) or a snapshot identifier (e.g. ...
def to_bqstorage(self): """Construct a BigQuery Storage API representation of this table. Install the ``google-cloud-bigquery-storage`` package to use this feature. If the ``table_id`` contains a partition identifier (e.g. ``my_table$201812``) or a snapshot identifier (e.g. ...
[ "Construct", "a", "BigQuery", "Storage", "API", "representation", "of", "this", "table", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/table.py#L293-L332
[ "def", "to_bqstorage", "(", "self", ")", ":", "if", "bigquery_storage_v1beta1", "is", "None", ":", "raise", "ValueError", "(", "_NO_BQSTORAGE_ERROR", ")", "table_ref", "=", "bigquery_storage_v1beta1", ".", "types", ".", "TableReference", "(", ")", "table_ref", "."...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Table.encryption_configuration
google.cloud.bigquery.table.EncryptionConfiguration: Custom encryption configuration for the table. Custom encryption configuration (e.g., Cloud KMS keys) or :data:`None` if using default encryption. See `protecting data with Cloud KMS keys <https://cloud.google.com/bigquery/do...
bigquery/google/cloud/bigquery/table.py
def encryption_configuration(self): """google.cloud.bigquery.table.EncryptionConfiguration: Custom encryption configuration for the table. Custom encryption configuration (e.g., Cloud KMS keys) or :data:`None` if using default encryption. See `protecting data with Cloud KMS key...
def encryption_configuration(self): """google.cloud.bigquery.table.EncryptionConfiguration: Custom encryption configuration for the table. Custom encryption configuration (e.g., Cloud KMS keys) or :data:`None` if using default encryption. See `protecting data with Cloud KMS key...
[ "google", ".", "cloud", ".", "bigquery", ".", "table", ".", "EncryptionConfiguration", ":", "Custom", "encryption", "configuration", "for", "the", "table", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/table.py#L471-L485
[ "def", "encryption_configuration", "(", "self", ")", ":", "prop", "=", "self", ".", "_properties", ".", "get", "(", "\"encryptionConfiguration\"", ")", "if", "prop", "is", "not", "None", ":", "prop", "=", "EncryptionConfiguration", ".", "from_api_repr", "(", "...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Table.time_partitioning
google.cloud.bigquery.table.TimePartitioning: Configures time-based partitioning for a table. Raises: ValueError: If the value is not :class:`TimePartitioning` or :data:`None`.
bigquery/google/cloud/bigquery/table.py
def time_partitioning(self): """google.cloud.bigquery.table.TimePartitioning: Configures time-based partitioning for a table. Raises: ValueError: If the value is not :class:`TimePartitioning` or :data:`None`. """ prop = self._properties.get("timeParti...
def time_partitioning(self): """google.cloud.bigquery.table.TimePartitioning: Configures time-based partitioning for a table. Raises: ValueError: If the value is not :class:`TimePartitioning` or :data:`None`. """ prop = self._properties.get("timeParti...
[ "google", ".", "cloud", ".", "bigquery", ".", "table", ".", "TimePartitioning", ":", "Configures", "time", "-", "based", "partitioning", "for", "a", "table", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/table.py#L565-L575
[ "def", "time_partitioning", "(", "self", ")", ":", "prop", "=", "self", ".", "_properties", ".", "get", "(", "\"timePartitioning\"", ")", "if", "prop", "is", "not", "None", ":", "return", "TimePartitioning", ".", "from_api_repr", "(", "prop", ")" ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Table.partition_expiration
Union[int, None]: Expiration time in milliseconds for a partition. If :attr:`partition_expiration` is set and :attr:`type_` is not set, :attr:`type_` will default to :attr:`~google.cloud.bigquery.table.TimePartitioningType.DAY`.
bigquery/google/cloud/bigquery/table.py
def partition_expiration(self): """Union[int, None]: Expiration time in milliseconds for a partition. If :attr:`partition_expiration` is set and :attr:`type_` is not set, :attr:`type_` will default to :attr:`~google.cloud.bigquery.table.TimePartitioningType.DAY`. """ war...
def partition_expiration(self): """Union[int, None]: Expiration time in milliseconds for a partition. If :attr:`partition_expiration` is set and :attr:`type_` is not set, :attr:`type_` will default to :attr:`~google.cloud.bigquery.table.TimePartitioningType.DAY`. """ war...
[ "Union", "[", "int", "None", "]", ":", "Expiration", "time", "in", "milliseconds", "for", "a", "partition", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/table.py#L618-L632
[ "def", "partition_expiration", "(", "self", ")", ":", "warnings", ".", "warn", "(", "\"This method will be deprecated in future versions. Please use \"", "\"Table.time_partitioning.expiration_ms instead.\"", ",", "PendingDeprecationWarning", ",", "stacklevel", "=", "2", ",", ")...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Table.clustering_fields
Union[List[str], None]: Fields defining clustering for the table (Defaults to :data:`None`). Clustering fields are immutable after table creation. .. note:: As of 2018-06-29, clustering fields cannot be set on a table which does not also have time partioning defined.
bigquery/google/cloud/bigquery/table.py
def clustering_fields(self): """Union[List[str], None]: Fields defining clustering for the table (Defaults to :data:`None`). Clustering fields are immutable after table creation. .. note:: As of 2018-06-29, clustering fields cannot be set on a table which does n...
def clustering_fields(self): """Union[List[str], None]: Fields defining clustering for the table (Defaults to :data:`None`). Clustering fields are immutable after table creation. .. note:: As of 2018-06-29, clustering fields cannot be set on a table which does n...
[ "Union", "[", "List", "[", "str", "]", "None", "]", ":", "Fields", "defining", "clustering", "for", "the", "table" ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/table.py#L647-L661
[ "def", "clustering_fields", "(", "self", ")", ":", "prop", "=", "self", ".", "_properties", ".", "get", "(", "\"clustering\"", ")", "if", "prop", "is", "not", "None", ":", "return", "list", "(", "prop", ".", "get", "(", "\"fields\"", ",", "(", ")", "...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Table.clustering_fields
Union[List[str], None]: Fields defining clustering for the table (Defaults to :data:`None`).
bigquery/google/cloud/bigquery/table.py
def clustering_fields(self, value): """Union[List[str], None]: Fields defining clustering for the table (Defaults to :data:`None`). """ if value is not None: prop = self._properties.setdefault("clustering", {}) prop["fields"] = value else: if ...
def clustering_fields(self, value): """Union[List[str], None]: Fields defining clustering for the table (Defaults to :data:`None`). """ if value is not None: prop = self._properties.setdefault("clustering", {}) prop["fields"] = value else: if ...
[ "Union", "[", "List", "[", "str", "]", "None", "]", ":", "Fields", "defining", "clustering", "for", "the", "table" ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/table.py#L664-L674
[ "def", "clustering_fields", "(", "self", ",", "value", ")", ":", "if", "value", "is", "not", "None", ":", "prop", "=", "self", ".", "_properties", ".", "setdefault", "(", "\"clustering\"", ",", "{", "}", ")", "prop", "[", "\"fields\"", "]", "=", "value...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Table.expires
Union[datetime.datetime, None]: Datetime at which the table will be deleted. Raises: ValueError: For invalid value types.
bigquery/google/cloud/bigquery/table.py
def expires(self): """Union[datetime.datetime, None]: Datetime at which the table will be deleted. Raises: ValueError: For invalid value types. """ expiration_time = self._properties.get("expirationTime") if expiration_time is not None: # expirati...
def expires(self): """Union[datetime.datetime, None]: Datetime at which the table will be deleted. Raises: ValueError: For invalid value types. """ expiration_time = self._properties.get("expirationTime") if expiration_time is not None: # expirati...
[ "Union", "[", "datetime", ".", "datetime", "None", "]", ":", "Datetime", "at", "which", "the", "table", "will", "be", "deleted", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/table.py#L693-L705
[ "def", "expires", "(", "self", ")", ":", "expiration_time", "=", "self", ".", "_properties", ".", "get", "(", "\"expirationTime\"", ")", "if", "expiration_time", "is", "not", "None", ":", "# expiration_time will be in milliseconds.", "return", "google", ".", "clou...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Table.external_data_configuration
Union[google.cloud.bigquery.ExternalConfig, None]: Configuration for an external data source (defaults to :data:`None`). Raises: ValueError: For invalid value types.
bigquery/google/cloud/bigquery/table.py
def external_data_configuration(self): """Union[google.cloud.bigquery.ExternalConfig, None]: Configuration for an external data source (defaults to :data:`None`). Raises: ValueError: For invalid value types. """ prop = self._properties.get("externalDataConfiguration"...
def external_data_configuration(self): """Union[google.cloud.bigquery.ExternalConfig, None]: Configuration for an external data source (defaults to :data:`None`). Raises: ValueError: For invalid value types. """ prop = self._properties.get("externalDataConfiguration"...
[ "Union", "[", "google", ".", "cloud", ".", "bigquery", ".", "ExternalConfig", "None", "]", ":", "Configuration", "for", "an", "external", "data", "source", "(", "defaults", "to", ":", "data", ":", "None", ")", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/table.py#L790-L800
[ "def", "external_data_configuration", "(", "self", ")", ":", "prop", "=", "self", ".", "_properties", ".", "get", "(", "\"externalDataConfiguration\"", ")", "if", "prop", "is", "not", "None", ":", "prop", "=", "ExternalConfig", ".", "from_api_repr", "(", "prop...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Table.from_api_repr
Factory: construct a table given its API representation Args: resource (Dict[str, object]): Table resource representation from the API Returns: google.cloud.bigquery.table.Table: Table parsed from ``resource``. Raises: KeyError: ...
bigquery/google/cloud/bigquery/table.py
def from_api_repr(cls, resource): """Factory: construct a table given its API representation Args: resource (Dict[str, object]): Table resource representation from the API Returns: google.cloud.bigquery.table.Table: Table parsed from ``resource``. ...
def from_api_repr(cls, resource): """Factory: construct a table given its API representation Args: resource (Dict[str, object]): Table resource representation from the API Returns: google.cloud.bigquery.table.Table: Table parsed from ``resource``. ...
[ "Factory", ":", "construct", "a", "table", "given", "its", "API", "representation" ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/table.py#L836-L870
[ "def", "from_api_repr", "(", "cls", ",", "resource", ")", ":", "from", "google", ".", "cloud", ".", "bigquery", "import", "dataset", "if", "(", "\"tableReference\"", "not", "in", "resource", "or", "\"tableId\"", "not", "in", "resource", "[", "\"tableReference\...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
TableListItem.partitioning_type
Union[str, None]: Time partitioning of the table if it is partitioned (Defaults to :data:`None`).
bigquery/google/cloud/bigquery/table.py
def partitioning_type(self): """Union[str, None]: Time partitioning of the table if it is partitioned (Defaults to :data:`None`). """ warnings.warn( "This method will be deprecated in future versions. Please use " "TableListItem.time_partitioning.type_ instead.", ...
def partitioning_type(self): """Union[str, None]: Time partitioning of the table if it is partitioned (Defaults to :data:`None`). """ warnings.warn( "This method will be deprecated in future versions. Please use " "TableListItem.time_partitioning.type_ instead.", ...
[ "Union", "[", "str", "None", "]", ":", "Time", "partitioning", "of", "the", "table", "if", "it", "is", "partitioned", "(", "Defaults", "to", ":", "data", ":", "None", ")", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/table.py#L1016-L1027
[ "def", "partitioning_type", "(", "self", ")", ":", "warnings", ".", "warn", "(", "\"This method will be deprecated in future versions. Please use \"", "\"TableListItem.time_partitioning.type_ instead.\"", ",", "PendingDeprecationWarning", ",", "stacklevel", "=", "2", ",", ")", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Row.items
Return items as ``(key, value)`` pairs. Returns: Iterable[Tuple[str, object]]: The ``(key, value)`` pairs representing this row. Examples: >>> list(Row(('a', 'b'), {'x': 0, 'y': 1}).items()) [('x', 'a'), ('y', 'b')]
bigquery/google/cloud/bigquery/table.py
def items(self): """Return items as ``(key, value)`` pairs. Returns: Iterable[Tuple[str, object]]: The ``(key, value)`` pairs representing this row. Examples: >>> list(Row(('a', 'b'), {'x': 0, 'y': 1}).items()) [('x', 'a'), ('y', 'b')] ...
def items(self): """Return items as ``(key, value)`` pairs. Returns: Iterable[Tuple[str, object]]: The ``(key, value)`` pairs representing this row. Examples: >>> list(Row(('a', 'b'), {'x': 0, 'y': 1}).items()) [('x', 'a'), ('y', 'b')] ...
[ "Return", "items", "as", "(", "key", "value", ")", "pairs", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/table.py#L1198-L1211
[ "def", "items", "(", "self", ")", ":", "for", "key", ",", "index", "in", "six", ".", "iteritems", "(", "self", ".", "_xxx_field_to_index", ")", ":", "yield", "(", "key", ",", "copy", ".", "deepcopy", "(", "self", ".", "_xxx_values", "[", "index", "]"...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Row.get
Return a value for key, with a default value if it does not exist. Args: key (str): The key of the column to access default (object): The default value to use if the key does not exist. (Defaults to :data:`None`.) Returns: object: ...
bigquery/google/cloud/bigquery/table.py
def get(self, key, default=None): """Return a value for key, with a default value if it does not exist. Args: key (str): The key of the column to access default (object): The default value to use if the key does not exist. (Defaults to :data:`None...
def get(self, key, default=None): """Return a value for key, with a default value if it does not exist. Args: key (str): The key of the column to access default (object): The default value to use if the key does not exist. (Defaults to :data:`None...
[ "Return", "a", "value", "for", "key", "with", "a", "default", "value", "if", "it", "does", "not", "exist", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/table.py#L1213-L1248
[ "def", "get", "(", "self", ",", "key", ",", "default", "=", "None", ")", ":", "index", "=", "self", ".", "_xxx_field_to_index", ".", "get", "(", "key", ")", "if", "index", "is", "None", ":", "return", "default", "return", "self", ".", "_xxx_values", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
RowIterator._get_next_page_response
Requests the next page from the path provided. Returns: Dict[str, object]: The parsed JSON response of the next page's contents.
bigquery/google/cloud/bigquery/table.py
def _get_next_page_response(self): """Requests the next page from the path provided. Returns: Dict[str, object]: The parsed JSON response of the next page's contents. """ params = self._get_query_params() if self._page_size is not None: pa...
def _get_next_page_response(self): """Requests the next page from the path provided. Returns: Dict[str, object]: The parsed JSON response of the next page's contents. """ params = self._get_query_params() if self._page_size is not None: pa...
[ "Requests", "the", "next", "page", "from", "the", "path", "provided", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/table.py#L1357-L1369
[ "def", "_get_next_page_response", "(", "self", ")", ":", "params", "=", "self", ".", "_get_query_params", "(", ")", "if", "self", ".", "_page_size", "is", "not", "None", ":", "params", "[", "\"maxResults\"", "]", "=", "self", ".", "_page_size", "return", "...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
RowIterator._to_dataframe_tabledata_list
Use (slower, but free) tabledata.list to construct a DataFrame.
bigquery/google/cloud/bigquery/table.py
def _to_dataframe_tabledata_list(self, dtypes, progress_bar=None): """Use (slower, but free) tabledata.list to construct a DataFrame.""" column_names = [field.name for field in self.schema] frames = [] for page in iter(self.pages): current_frame = self._to_dataframe_dtypes(p...
def _to_dataframe_tabledata_list(self, dtypes, progress_bar=None): """Use (slower, but free) tabledata.list to construct a DataFrame.""" column_names = [field.name for field in self.schema] frames = [] for page in iter(self.pages): current_frame = self._to_dataframe_dtypes(p...
[ "Use", "(", "slower", "but", "free", ")", "tabledata", ".", "list", "to", "construct", "a", "DataFrame", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/table.py#L1390-L1410
[ "def", "_to_dataframe_tabledata_list", "(", "self", ",", "dtypes", ",", "progress_bar", "=", "None", ")", ":", "column_names", "=", "[", "field", ".", "name", "for", "field", "in", "self", ".", "schema", "]", "frames", "=", "[", "]", "for", "page", "in",...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
RowIterator._to_dataframe_bqstorage
Use (faster, but billable) BQ Storage API to construct DataFrame.
bigquery/google/cloud/bigquery/table.py
def _to_dataframe_bqstorage(self, bqstorage_client, dtypes, progress_bar=None): """Use (faster, but billable) BQ Storage API to construct DataFrame.""" if bigquery_storage_v1beta1 is None: raise ValueError(_NO_BQSTORAGE_ERROR) if "$" in self._table.table_id: raise ValueE...
def _to_dataframe_bqstorage(self, bqstorage_client, dtypes, progress_bar=None): """Use (faster, but billable) BQ Storage API to construct DataFrame.""" if bigquery_storage_v1beta1 is None: raise ValueError(_NO_BQSTORAGE_ERROR) if "$" in self._table.table_id: raise ValueE...
[ "Use", "(", "faster", "but", "billable", ")", "BQ", "Storage", "API", "to", "construct", "DataFrame", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/table.py#L1480-L1580
[ "def", "_to_dataframe_bqstorage", "(", "self", ",", "bqstorage_client", ",", "dtypes", ",", "progress_bar", "=", "None", ")", ":", "if", "bigquery_storage_v1beta1", "is", "None", ":", "raise", "ValueError", "(", "_NO_BQSTORAGE_ERROR", ")", "if", "\"$\"", "in", "...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
RowIterator._get_progress_bar
Construct a tqdm progress bar object, if tqdm is installed.
bigquery/google/cloud/bigquery/table.py
def _get_progress_bar(self, progress_bar_type): """Construct a tqdm progress bar object, if tqdm is installed.""" if tqdm is None: if progress_bar_type is not None: warnings.warn(_NO_TQDM_ERROR, UserWarning, stacklevel=3) return None description = "Downlo...
def _get_progress_bar(self, progress_bar_type): """Construct a tqdm progress bar object, if tqdm is installed.""" if tqdm is None: if progress_bar_type is not None: warnings.warn(_NO_TQDM_ERROR, UserWarning, stacklevel=3) return None description = "Downlo...
[ "Construct", "a", "tqdm", "progress", "bar", "object", "if", "tqdm", "is", "installed", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/table.py#L1582-L1606
[ "def", "_get_progress_bar", "(", "self", ",", "progress_bar_type", ")", ":", "if", "tqdm", "is", "None", ":", "if", "progress_bar_type", "is", "not", "None", ":", "warnings", ".", "warn", "(", "_NO_TQDM_ERROR", ",", "UserWarning", ",", "stacklevel", "=", "3"...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
RowIterator.to_dataframe
Create a pandas DataFrame by loading all pages of a query. Args: bqstorage_client ( \ google.cloud.bigquery_storage_v1beta1.BigQueryStorageClient \ ): **Beta Feature** Optional. A BigQuery Storage API client. If supplied, use the faster Bi...
bigquery/google/cloud/bigquery/table.py
def to_dataframe(self, bqstorage_client=None, dtypes=None, progress_bar_type=None): """Create a pandas DataFrame by loading all pages of a query. Args: bqstorage_client ( \ google.cloud.bigquery_storage_v1beta1.BigQueryStorageClient \ ): **Beta Fe...
def to_dataframe(self, bqstorage_client=None, dtypes=None, progress_bar_type=None): """Create a pandas DataFrame by loading all pages of a query. Args: bqstorage_client ( \ google.cloud.bigquery_storage_v1beta1.BigQueryStorageClient \ ): **Beta Fe...
[ "Create", "a", "pandas", "DataFrame", "by", "loading", "all", "pages", "of", "a", "query", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/table.py#L1608-L1695
[ "def", "to_dataframe", "(", "self", ",", "bqstorage_client", "=", "None", ",", "dtypes", "=", "None", ",", "progress_bar_type", "=", "None", ")", ":", "if", "pandas", "is", "None", ":", "raise", "ValueError", "(", "_NO_PANDAS_ERROR", ")", "if", "dtypes", "...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_EmptyRowIterator.to_dataframe
Create an empty dataframe. Args: bqstorage_client (Any): Ignored. Added for compatibility with RowIterator. dtypes (Any): Ignored. Added for compatibility with RowIterator. progress_bar_type (Any): Ignored. Added for compatibil...
bigquery/google/cloud/bigquery/table.py
def to_dataframe(self, bqstorage_client=None, dtypes=None, progress_bar_type=None): """Create an empty dataframe. Args: bqstorage_client (Any): Ignored. Added for compatibility with RowIterator. dtypes (Any): Ignored. Added for compatibility with ...
def to_dataframe(self, bqstorage_client=None, dtypes=None, progress_bar_type=None): """Create an empty dataframe. Args: bqstorage_client (Any): Ignored. Added for compatibility with RowIterator. dtypes (Any): Ignored. Added for compatibility with ...
[ "Create", "an", "empty", "dataframe", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/table.py#L1710-L1727
[ "def", "to_dataframe", "(", "self", ",", "bqstorage_client", "=", "None", ",", "dtypes", "=", "None", ",", "progress_bar_type", "=", "None", ")", ":", "if", "pandas", "is", "None", ":", "raise", "ValueError", "(", "_NO_PANDAS_ERROR", ")", "return", "pandas",...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
TimePartitioning.from_api_repr
Return a :class:`TimePartitioning` object deserialized from a dict. This method creates a new ``TimePartitioning`` instance that points to the ``api_repr`` parameter as its internal properties dict. This means that when a ``TimePartitioning`` instance is stored as a property of another ...
bigquery/google/cloud/bigquery/table.py
def from_api_repr(cls, api_repr): """Return a :class:`TimePartitioning` object deserialized from a dict. This method creates a new ``TimePartitioning`` instance that points to the ``api_repr`` parameter as its internal properties dict. This means that when a ``TimePartitioning`` instanc...
def from_api_repr(cls, api_repr): """Return a :class:`TimePartitioning` object deserialized from a dict. This method creates a new ``TimePartitioning`` instance that points to the ``api_repr`` parameter as its internal properties dict. This means that when a ``TimePartitioning`` instanc...
[ "Return", "a", ":", "class", ":", "TimePartitioning", "object", "deserialized", "from", "a", "dict", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/table.py#L1820-L1846
[ "def", "from_api_repr", "(", "cls", ",", "api_repr", ")", ":", "instance", "=", "cls", "(", "api_repr", "[", "\"type\"", "]", ")", "instance", ".", "_properties", "=", "api_repr", "return", "instance" ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_generate_faux_mime_message
Convert response, content -> (multipart) email.message. Helper for _unpack_batch_response.
storage/google/cloud/storage/batch.py
def _generate_faux_mime_message(parser, response): """Convert response, content -> (multipart) email.message. Helper for _unpack_batch_response. """ # We coerce to bytes to get consistent concat across # Py2 and Py3. Percent formatting is insufficient since # it includes the b in Py3. conte...
def _generate_faux_mime_message(parser, response): """Convert response, content -> (multipart) email.message. Helper for _unpack_batch_response. """ # We coerce to bytes to get consistent concat across # Py2 and Py3. Percent formatting is insufficient since # it includes the b in Py3. conte...
[ "Convert", "response", "content", "-", ">", "(", "multipart", ")", "email", ".", "message", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/storage/google/cloud/storage/batch.py#L284-L301
[ "def", "_generate_faux_mime_message", "(", "parser", ",", "response", ")", ":", "# We coerce to bytes to get consistent concat across", "# Py2 and Py3. Percent formatting is insufficient since", "# it includes the b in Py3.", "content_type", "=", "_helpers", ".", "_to_bytes", "(", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_unpack_batch_response
Convert requests.Response -> [(headers, payload)]. Creates a generator of tuples of emulating the responses to :meth:`requests.Session.request`. :type response: :class:`requests.Response` :param response: HTTP response / headers from a request.
storage/google/cloud/storage/batch.py
def _unpack_batch_response(response): """Convert requests.Response -> [(headers, payload)]. Creates a generator of tuples of emulating the responses to :meth:`requests.Session.request`. :type response: :class:`requests.Response` :param response: HTTP response / headers from a request. """ ...
def _unpack_batch_response(response): """Convert requests.Response -> [(headers, payload)]. Creates a generator of tuples of emulating the responses to :meth:`requests.Session.request`. :type response: :class:`requests.Response` :param response: HTTP response / headers from a request. """ ...
[ "Convert", "requests", ".", "Response", "-", ">", "[", "(", "headers", "payload", ")", "]", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/storage/google/cloud/storage/batch.py#L304-L335
[ "def", "_unpack_batch_response", "(", "response", ")", ":", "parser", "=", "Parser", "(", ")", "message", "=", "_generate_faux_mime_message", "(", "parser", ",", "response", ")", "if", "not", "isinstance", "(", "message", ".", "_payload", ",", "list", ")", "...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Batch._do_request
Override Connection: defer actual HTTP request. Only allow up to ``_MAX_BATCH_SIZE`` requests to be deferred. :type method: str :param method: The HTTP method to use in the request. :type url: str :param url: The URL to send the request to. :type headers: dict ...
storage/google/cloud/storage/batch.py
def _do_request(self, method, url, headers, data, target_object): """Override Connection: defer actual HTTP request. Only allow up to ``_MAX_BATCH_SIZE`` requests to be deferred. :type method: str :param method: The HTTP method to use in the request. :type url: str :p...
def _do_request(self, method, url, headers, data, target_object): """Override Connection: defer actual HTTP request. Only allow up to ``_MAX_BATCH_SIZE`` requests to be deferred. :type method: str :param method: The HTTP method to use in the request. :type url: str :p...
[ "Override", "Connection", ":", "defer", "actual", "HTTP", "request", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/storage/google/cloud/storage/batch.py#L153-L189
[ "def", "_do_request", "(", "self", ",", "method", ",", "url", ",", "headers", ",", "data", ",", "target_object", ")", ":", "if", "len", "(", "self", ".", "_requests", ")", ">=", "self", ".", "_MAX_BATCH_SIZE", ":", "raise", "ValueError", "(", "\"Too many...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Batch._prepare_batch_request
Prepares headers and body for a batch request. :rtype: tuple (dict, str) :returns: The pair of headers and body of the batch request to be sent. :raises: :class:`ValueError` if no requests have been deferred.
storage/google/cloud/storage/batch.py
def _prepare_batch_request(self): """Prepares headers and body for a batch request. :rtype: tuple (dict, str) :returns: The pair of headers and body of the batch request to be sent. :raises: :class:`ValueError` if no requests have been deferred. """ if len(self._requests...
def _prepare_batch_request(self): """Prepares headers and body for a batch request. :rtype: tuple (dict, str) :returns: The pair of headers and body of the batch request to be sent. :raises: :class:`ValueError` if no requests have been deferred. """ if len(self._requests...
[ "Prepares", "headers", "and", "body", "for", "a", "batch", "request", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/storage/google/cloud/storage/batch.py#L191-L218
[ "def", "_prepare_batch_request", "(", "self", ")", ":", "if", "len", "(", "self", ".", "_requests", ")", "==", "0", ":", "raise", "ValueError", "(", "\"No deferred requests\"", ")", "multi", "=", "MIMEMultipart", "(", ")", "for", "method", ",", "uri", ",",...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Batch._finish_futures
Apply all the batch responses to the futures created. :type responses: list of (headers, payload) tuples. :param responses: List of headers and payloads from each response in the batch. :raises: :class:`ValueError` if no requests have been deferred.
storage/google/cloud/storage/batch.py
def _finish_futures(self, responses): """Apply all the batch responses to the futures created. :type responses: list of (headers, payload) tuples. :param responses: List of headers and payloads from each response in the batch. :raises: :class:`ValueError` if n...
def _finish_futures(self, responses): """Apply all the batch responses to the futures created. :type responses: list of (headers, payload) tuples. :param responses: List of headers and payloads from each response in the batch. :raises: :class:`ValueError` if n...
[ "Apply", "all", "the", "batch", "responses", "to", "the", "futures", "created", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/storage/google/cloud/storage/batch.py#L220-L246
[ "def", "_finish_futures", "(", "self", ",", "responses", ")", ":", "# If a bad status occurs, we track it, but don't raise an exception", "# until all futures have been populated.", "exception_args", "=", "None", "if", "len", "(", "self", ".", "_target_objects", ")", "!=", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Batch.finish
Submit a single `multipart/mixed` request with deferred requests. :rtype: list of tuples :returns: one ``(headers, payload)`` tuple per deferred request.
storage/google/cloud/storage/batch.py
def finish(self): """Submit a single `multipart/mixed` request with deferred requests. :rtype: list of tuples :returns: one ``(headers, payload)`` tuple per deferred request. """ headers, body = self._prepare_batch_request() url = "%s/batch/storage/v1" % self.API_BASE_U...
def finish(self): """Submit a single `multipart/mixed` request with deferred requests. :rtype: list of tuples :returns: one ``(headers, payload)`` tuple per deferred request. """ headers, body = self._prepare_batch_request() url = "%s/batch/storage/v1" % self.API_BASE_U...
[ "Submit", "a", "single", "multipart", "/", "mixed", "request", "with", "deferred", "requests", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/storage/google/cloud/storage/batch.py#L248-L266
[ "def", "finish", "(", "self", ")", ":", "headers", ",", "body", "=", "self", ".", "_prepare_batch_request", "(", ")", "url", "=", "\"%s/batch/storage/v1\"", "%", "self", ".", "API_BASE_URL", "# Use the private ``_base_connection`` rather than the property", "# ``_connec...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_restart_on_unavailable
Restart iteration after :exc:`.ServiceUnavailable`. :type restart: callable :param restart: curried function returning iterator
spanner/google/cloud/spanner_v1/snapshot.py
def _restart_on_unavailable(restart): """Restart iteration after :exc:`.ServiceUnavailable`. :type restart: callable :param restart: curried function returning iterator """ resume_token = b"" item_buffer = [] iterator = restart() while True: try: for item in iterator...
def _restart_on_unavailable(restart): """Restart iteration after :exc:`.ServiceUnavailable`. :type restart: callable :param restart: curried function returning iterator """ resume_token = b"" item_buffer = [] iterator = restart() while True: try: for item in iterator...
[ "Restart", "iteration", "after", ":", "exc", ":", ".", "ServiceUnavailable", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/spanner/google/cloud/spanner_v1/snapshot.py#L34-L61
[ "def", "_restart_on_unavailable", "(", "restart", ")", ":", "resume_token", "=", "b\"\"", "item_buffer", "=", "[", "]", "iterator", "=", "restart", "(", ")", "while", "True", ":", "try", ":", "for", "item", "in", "iterator", ":", "item_buffer", ".", "appen...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_SnapshotBase.read
Perform a ``StreamingRead`` API request for rows in a table. :type table: str :param table: name of the table from which to fetch data :type columns: list of str :param columns: names of columns to be retrieved :type keyset: :class:`~google.cloud.spanner_v1.keyset.KeySet` ...
spanner/google/cloud/spanner_v1/snapshot.py
def read(self, table, columns, keyset, index="", limit=0, partition=None): """Perform a ``StreamingRead`` API request for rows in a table. :type table: str :param table: name of the table from which to fetch data :type columns: list of str :param columns: names of columns to be...
def read(self, table, columns, keyset, index="", limit=0, partition=None): """Perform a ``StreamingRead`` API request for rows in a table. :type table: str :param table: name of the table from which to fetch data :type columns: list of str :param columns: names of columns to be...
[ "Perform", "a", "StreamingRead", "API", "request", "for", "rows", "in", "a", "table", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/spanner/google/cloud/spanner_v1/snapshot.py#L89-L152
[ "def", "read", "(", "self", ",", "table", ",", "columns", ",", "keyset", ",", "index", "=", "\"\"", ",", "limit", "=", "0", ",", "partition", "=", "None", ")", ":", "if", "self", ".", "_read_request_count", ">", "0", ":", "if", "not", "self", ".", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_SnapshotBase.execute_sql
Perform an ``ExecuteStreamingSql`` API request. :type sql: str :param sql: SQL query statement :type params: dict, {str -> column value} :param params: values for parameter replacement. Keys must match the names used in ``sql``. :type param_types: dict[...
spanner/google/cloud/spanner_v1/snapshot.py
def execute_sql( self, sql, params=None, param_types=None, query_mode=None, partition=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, ): """Perform an ``ExecuteStreamingSql`` API request. ...
def execute_sql( self, sql, params=None, param_types=None, query_mode=None, partition=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, ): """Perform an ``ExecuteStreamingSql`` API request. ...
[ "Perform", "an", "ExecuteStreamingSql", "API", "request", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/spanner/google/cloud/spanner_v1/snapshot.py#L154-L237
[ "def", "execute_sql", "(", "self", ",", "sql", ",", "params", "=", "None", ",", "param_types", "=", "None", ",", "query_mode", "=", "None", ",", "partition", "=", "None", ",", "retry", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "method", "."...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_SnapshotBase.partition_read
Perform a ``ParitionRead`` API request for rows in a table. :type table: str :param table: name of the table from which to fetch data :type columns: list of str :param columns: names of columns to be retrieved :type keyset: :class:`~google.cloud.spanner_v1.keyset.KeySet` ...
spanner/google/cloud/spanner_v1/snapshot.py
def partition_read( self, table, columns, keyset, index="", partition_size_bytes=None, max_partitions=None, ): """Perform a ``ParitionRead`` API request for rows in a table. :type table: str :param table: name of the table from which t...
def partition_read( self, table, columns, keyset, index="", partition_size_bytes=None, max_partitions=None, ): """Perform a ``ParitionRead`` API request for rows in a table. :type table: str :param table: name of the table from which t...
[ "Perform", "a", "ParitionRead", "API", "request", "for", "rows", "in", "a", "table", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/spanner/google/cloud/spanner_v1/snapshot.py#L239-L306
[ "def", "partition_read", "(", "self", ",", "table", ",", "columns", ",", "keyset", ",", "index", "=", "\"\"", ",", "partition_size_bytes", "=", "None", ",", "max_partitions", "=", "None", ",", ")", ":", "if", "not", "self", ".", "_multi_use", ":", "raise...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_SnapshotBase.partition_query
Perform a ``ParitionQuery`` API request. :type sql: str :param sql: SQL query statement :type params: dict, {str -> column value} :param params: values for parameter replacement. Keys must match the names used in ``sql``. :type param_types: dict[str -> ...
spanner/google/cloud/spanner_v1/snapshot.py
def partition_query( self, sql, params=None, param_types=None, partition_size_bytes=None, max_partitions=None, ): """Perform a ``ParitionQuery`` API request. :type sql: str :param sql: SQL query statement :type params: dict, {str -> c...
def partition_query( self, sql, params=None, param_types=None, partition_size_bytes=None, max_partitions=None, ): """Perform a ``ParitionQuery`` API request. :type sql: str :param sql: SQL query statement :type params: dict, {str -> c...
[ "Perform", "a", "ParitionQuery", "API", "request", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/spanner/google/cloud/spanner_v1/snapshot.py#L308-L381
[ "def", "partition_query", "(", "self", ",", "sql", ",", "params", "=", "None", ",", "param_types", "=", "None", ",", "partition_size_bytes", "=", "None", ",", "max_partitions", "=", "None", ",", ")", ":", "if", "not", "self", ".", "_multi_use", ":", "rai...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Snapshot._make_txn_selector
Helper for :meth:`read`.
spanner/google/cloud/spanner_v1/snapshot.py
def _make_txn_selector(self): """Helper for :meth:`read`.""" if self._transaction_id is not None: return TransactionSelector(id=self._transaction_id) if self._read_timestamp: key = "read_timestamp" value = _datetime_to_pb_timestamp(self._read_timestamp) ...
def _make_txn_selector(self): """Helper for :meth:`read`.""" if self._transaction_id is not None: return TransactionSelector(id=self._transaction_id) if self._read_timestamp: key = "read_timestamp" value = _datetime_to_pb_timestamp(self._read_timestamp) ...
[ "Helper", "for", ":", "meth", ":", "read", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/spanner/google/cloud/spanner_v1/snapshot.py#L449-L477
[ "def", "_make_txn_selector", "(", "self", ")", ":", "if", "self", ".", "_transaction_id", "is", "not", "None", ":", "return", "TransactionSelector", "(", "id", "=", "self", ".", "_transaction_id", ")", "if", "self", ".", "_read_timestamp", ":", "key", "=", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Snapshot.begin
Begin a read-only transaction on the database. :rtype: bytes :returns: the ID for the newly-begun transaction. :raises ValueError: if the transaction is already begun, committed, or rolled back.
spanner/google/cloud/spanner_v1/snapshot.py
def begin(self): """Begin a read-only transaction on the database. :rtype: bytes :returns: the ID for the newly-begun transaction. :raises ValueError: if the transaction is already begun, committed, or rolled back. """ if not self._multi_use: rai...
def begin(self): """Begin a read-only transaction on the database. :rtype: bytes :returns: the ID for the newly-begun transaction. :raises ValueError: if the transaction is already begun, committed, or rolled back. """ if not self._multi_use: rai...
[ "Begin", "a", "read", "-", "only", "transaction", "on", "the", "database", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/spanner/google/cloud/spanner_v1/snapshot.py#L479-L505
[ "def", "begin", "(", "self", ")", ":", "if", "not", "self", ".", "_multi_use", ":", "raise", "ValueError", "(", "\"Cannot call 'begin' on single-use snapshots\"", ")", "if", "self", ".", "_transaction_id", "is", "not", "None", ":", "raise", "ValueError", "(", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
ClientInfo.to_user_agent
Returns the user-agent string for this client info.
api_core/google/api_core/gapic_v1/client_info.py
def to_user_agent(self): """Returns the user-agent string for this client info.""" # Note: the order here is important as the internal metrics system # expects these items to be in specific locations. ua = "" if self.user_agent is not None: ua += "{user_agent} " ...
def to_user_agent(self): """Returns the user-agent string for this client info.""" # Note: the order here is important as the internal metrics system # expects these items to be in specific locations. ua = "" if self.user_agent is not None: ua += "{user_agent} " ...
[ "Returns", "the", "user", "-", "agent", "string", "for", "this", "client", "info", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/api_core/google/api_core/gapic_v1/client_info.py#L75-L98
[ "def", "to_user_agent", "(", "self", ")", ":", "# Note: the order here is important as the internal metrics system", "# expects these items to be in specific locations.", "ua", "=", "\"\"", "if", "self", ".", "user_agent", "is", "not", "None", ":", "ua", "+=", "\"{user_agen...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
BigQueryStorageClient.read_rows
Reads rows from the table in the format prescribed by the read session. Each response contains one or more table rows, up to a maximum of 10 MiB per response; read requests which attempt to read individual rows larger than this will fail. Each request also returns a set of stream statis...
bigquery_storage/google/cloud/bigquery_storage_v1beta1/client.py
def read_rows( self, read_position, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Reads rows from the table in the format prescribed by the read session. Each response contains one...
def read_rows( self, read_position, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Reads rows from the table in the format prescribed by the read session. Each response contains one...
[ "Reads", "rows", "from", "the", "table", "in", "the", "format", "prescribed", "by", "the", "read", "session", ".", "Each", "response", "contains", "one", "or", "more", "table", "rows", "up", "to", "a", "maximum", "of", "10", "MiB", "per", "response", ";"...
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery_storage/google/cloud/bigquery_storage_v1beta1/client.py#L42-L126
[ "def", "read_rows", "(", "self", ",", "read_position", ",", "retry", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "method", ".", "DEFAULT", ",", "timeout", "=", "google", ".", "api_core", ".", "gapic_v1", ".", "method", ".", "DEFAULT", ",", "met...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
make_trace_api
Create an instance of the gapic Trace API. Args: client (~google.cloud.trace.client.Client): The client that holds configuration details. Returns: A :class:`~google.cloud.trace._gapic._TraceAPI` instance with the proper configurations.
trace/google/cloud/trace/v1/_gapic.py
def make_trace_api(client): """ Create an instance of the gapic Trace API. Args: client (~google.cloud.trace.client.Client): The client that holds configuration details. Returns: A :class:`~google.cloud.trace._gapic._TraceAPI` instance with the proper configurations...
def make_trace_api(client): """ Create an instance of the gapic Trace API. Args: client (~google.cloud.trace.client.Client): The client that holds configuration details. Returns: A :class:`~google.cloud.trace._gapic._TraceAPI` instance with the proper configurations...
[ "Create", "an", "instance", "of", "the", "gapic", "Trace", "API", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/trace/google/cloud/trace/v1/_gapic.py#L168-L183
[ "def", "make_trace_api", "(", "client", ")", ":", "generated", "=", "trace_service_client", ".", "TraceServiceClient", "(", "credentials", "=", "client", ".", "_credentials", ",", "client_info", "=", "_CLIENT_INFO", ")", "return", "_TraceAPI", "(", "generated", ",...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_TraceAPI.patch_traces
Sends new traces to Stackdriver Trace or updates existing traces. Args: project_id (Optional[str]): ID of the Cloud project where the trace data is stored. traces (dict): Required. The traces to be patched in the API call.
trace/google/cloud/trace/v1/_gapic.py
def patch_traces(self, project_id, traces): """ Sends new traces to Stackdriver Trace or updates existing traces. Args: project_id (Optional[str]): ID of the Cloud project where the trace data is stored. traces (dict): Required. The traces to be patched i...
def patch_traces(self, project_id, traces): """ Sends new traces to Stackdriver Trace or updates existing traces. Args: project_id (Optional[str]): ID of the Cloud project where the trace data is stored. traces (dict): Required. The traces to be patched i...
[ "Sends", "new", "traces", "to", "Stackdriver", "Trace", "or", "updates", "existing", "traces", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/trace/google/cloud/trace/v1/_gapic.py#L47-L57
[ "def", "patch_traces", "(", "self", ",", "project_id", ",", "traces", ")", ":", "traces_pb", "=", "_traces_mapping_to_pb", "(", "traces", ")", "self", ".", "_gapic_api", ".", "patch_traces", "(", "project_id", ",", "traces_pb", ")" ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_TraceAPI.get_trace
Gets a single trace by its ID. Args: trace_id (str): ID of the trace to return. project_id (str): Required. ID of the Cloud project where the trace data is stored. Returns: A Trace dict.
trace/google/cloud/trace/v1/_gapic.py
def get_trace(self, project_id, trace_id): """ Gets a single trace by its ID. Args: trace_id (str): ID of the trace to return. project_id (str): Required. ID of the Cloud project where the trace data is stored. Returns: A Trace dict. ...
def get_trace(self, project_id, trace_id): """ Gets a single trace by its ID. Args: trace_id (str): ID of the trace to return. project_id (str): Required. ID of the Cloud project where the trace data is stored. Returns: A Trace dict. ...
[ "Gets", "a", "single", "trace", "by", "its", "ID", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/trace/google/cloud/trace/v1/_gapic.py#L59-L73
[ "def", "get_trace", "(", "self", ",", "project_id", ",", "trace_id", ")", ":", "trace_pb", "=", "self", ".", "_gapic_api", ".", "get_trace", "(", "project_id", ",", "trace_id", ")", "trace_mapping", "=", "_parse_trace_pb", "(", "trace_pb", ")", "return", "tr...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_TraceAPI.list_traces
Returns of a list of traces that match the filter conditions. Args: project_id (Optional[str]): ID of the Cloud project where the trace data is stored. view (Optional[~google.cloud.trace_v1.gapic.enums. ListTracesRequest.ViewType]): Type of data returned...
trace/google/cloud/trace/v1/_gapic.py
def list_traces( self, project_id, view=None, page_size=None, start_time=None, end_time=None, filter_=None, order_by=None, page_token=None, ): """ Returns of a list of traces that match the filter conditions. Args: ...
def list_traces( self, project_id, view=None, page_size=None, start_time=None, end_time=None, filter_=None, order_by=None, page_token=None, ): """ Returns of a list of traces that match the filter conditions. Args: ...
[ "Returns", "of", "a", "list", "of", "traces", "that", "match", "the", "filter", "conditions", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/trace/google/cloud/trace/v1/_gapic.py#L75-L133
[ "def", "list_traces", "(", "self", ",", "project_id", ",", "view", "=", "None", ",", "page_size", "=", "None", ",", "start_time", "=", "None", ",", "end_time", "=", "None", ",", "filter_", "=", "None", ",", "order_by", "=", "None", ",", "page_token", "...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_item_to_bucket
Convert a JSON bucket to the native object. :type iterator: :class:`~google.api_core.page_iterator.Iterator` :param iterator: The iterator that has retrieved the item. :type item: dict :param item: An item to be converted to a bucket. :rtype: :class:`.Bucket` :returns: The next bucket in the ...
storage/google/cloud/storage/client.py
def _item_to_bucket(iterator, item): """Convert a JSON bucket to the native object. :type iterator: :class:`~google.api_core.page_iterator.Iterator` :param iterator: The iterator that has retrieved the item. :type item: dict :param item: An item to be converted to a bucket. :rtype: :class:`.B...
def _item_to_bucket(iterator, item): """Convert a JSON bucket to the native object. :type iterator: :class:`~google.api_core.page_iterator.Iterator` :param iterator: The iterator that has retrieved the item. :type item: dict :param item: An item to be converted to a bucket. :rtype: :class:`.B...
[ "Convert", "a", "JSON", "bucket", "to", "the", "native", "object", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/storage/google/cloud/storage/client.py#L374-L389
[ "def", "_item_to_bucket", "(", "iterator", ",", "item", ")", ":", "name", "=", "item", ".", "get", "(", "\"name\"", ")", "bucket", "=", "Bucket", "(", "iterator", ".", "client", ",", "name", ")", "bucket", ".", "_set_properties", "(", "item", ")", "ret...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Client.create_anonymous_client
Factory: return client with anonymous credentials. .. note:: Such a client has only limited access to "public" buckets: listing their contents and downloading their blobs. :rtype: :class:`google.cloud.storage.client.Client` :returns: Instance w/ anonymous credentials and...
storage/google/cloud/storage/client.py
def create_anonymous_client(cls): """Factory: return client with anonymous credentials. .. note:: Such a client has only limited access to "public" buckets: listing their contents and downloading their blobs. :rtype: :class:`google.cloud.storage.client.Client` :r...
def create_anonymous_client(cls): """Factory: return client with anonymous credentials. .. note:: Such a client has only limited access to "public" buckets: listing their contents and downloading their blobs. :rtype: :class:`google.cloud.storage.client.Client` :r...
[ "Factory", ":", "return", "client", "with", "anonymous", "credentials", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/storage/google/cloud/storage/client.py#L81-L94
[ "def", "create_anonymous_client", "(", "cls", ")", ":", "client", "=", "cls", "(", "project", "=", "\"<none>\"", ",", "credentials", "=", "AnonymousCredentials", "(", ")", ")", "client", ".", "project", "=", "None", "return", "client" ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Client.get_service_account_email
Get the email address of the project's GCS service account :type project: str :param project: (Optional) Project ID to use for retreiving GCS service account email address. Defaults to the client's project. :rtype: str :returns: service account email address
storage/google/cloud/storage/client.py
def get_service_account_email(self, project=None): """Get the email address of the project's GCS service account :type project: str :param project: (Optional) Project ID to use for retreiving GCS service account email address. Defaults to the client's project. ...
def get_service_account_email(self, project=None): """Get the email address of the project's GCS service account :type project: str :param project: (Optional) Project ID to use for retreiving GCS service account email address. Defaults to the client's project. ...
[ "Get", "the", "email", "address", "of", "the", "project", "s", "GCS", "service", "account" ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/storage/google/cloud/storage/client.py#L157-L172
[ "def", "get_service_account_email", "(", "self", ",", "project", "=", "None", ")", ":", "if", "project", "is", "None", ":", "project", "=", "self", ".", "project", "path", "=", "\"/projects/%s/serviceAccount\"", "%", "(", "project", ",", ")", "api_response", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Client.bucket
Factory constructor for bucket object. .. note:: This will not make an HTTP request; it simply instantiates a bucket object owned by this client. :type bucket_name: str :param bucket_name: The name of the bucket to be instantiated. :type user_project: str :...
storage/google/cloud/storage/client.py
def bucket(self, bucket_name, user_project=None): """Factory constructor for bucket object. .. note:: This will not make an HTTP request; it simply instantiates a bucket object owned by this client. :type bucket_name: str :param bucket_name: The name of the bucket t...
def bucket(self, bucket_name, user_project=None): """Factory constructor for bucket object. .. note:: This will not make an HTTP request; it simply instantiates a bucket object owned by this client. :type bucket_name: str :param bucket_name: The name of the bucket t...
[ "Factory", "constructor", "for", "bucket", "object", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/storage/google/cloud/storage/client.py#L174-L191
[ "def", "bucket", "(", "self", ",", "bucket_name", ",", "user_project", "=", "None", ")", ":", "return", "Bucket", "(", "client", "=", "self", ",", "name", "=", "bucket_name", ",", "user_project", "=", "user_project", ")" ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Client.get_bucket
Get a bucket by name. If the bucket isn't found, this will raise a :class:`google.cloud.exceptions.NotFound`. For example: .. literalinclude:: snippets.py :start-after: [START get_bucket] :end-before: [END get_bucket] This implements "storage.buckets.g...
storage/google/cloud/storage/client.py
def get_bucket(self, bucket_name): """Get a bucket by name. If the bucket isn't found, this will raise a :class:`google.cloud.exceptions.NotFound`. For example: .. literalinclude:: snippets.py :start-after: [START get_bucket] :end-before: [END get_bucke...
def get_bucket(self, bucket_name): """Get a bucket by name. If the bucket isn't found, this will raise a :class:`google.cloud.exceptions.NotFound`. For example: .. literalinclude:: snippets.py :start-after: [START get_bucket] :end-before: [END get_bucke...
[ "Get", "a", "bucket", "by", "name", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/storage/google/cloud/storage/client.py#L205-L228
[ "def", "get_bucket", "(", "self", ",", "bucket_name", ")", ":", "bucket", "=", "Bucket", "(", "self", ",", "name", "=", "bucket_name", ")", "bucket", ".", "reload", "(", "client", "=", "self", ")", "return", "bucket" ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Client.create_bucket
Create a new bucket. For example: .. literalinclude:: snippets.py :start-after: [START create_bucket] :end-before: [END create_bucket] This implements "storage.buckets.insert". If the bucket already exists, will raise :class:`google.cloud.exceptions.Co...
storage/google/cloud/storage/client.py
def create_bucket(self, bucket_name, requester_pays=None, project=None): """Create a new bucket. For example: .. literalinclude:: snippets.py :start-after: [START create_bucket] :end-before: [END create_bucket] This implements "storage.buckets.insert". ...
def create_bucket(self, bucket_name, requester_pays=None, project=None): """Create a new bucket. For example: .. literalinclude:: snippets.py :start-after: [START create_bucket] :end-before: [END create_bucket] This implements "storage.buckets.insert". ...
[ "Create", "a", "new", "bucket", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/storage/google/cloud/storage/client.py#L251-L288
[ "def", "create_bucket", "(", "self", ",", "bucket_name", ",", "requester_pays", "=", "None", ",", "project", "=", "None", ")", ":", "bucket", "=", "Bucket", "(", "self", ",", "name", "=", "bucket_name", ")", "if", "requester_pays", "is", "not", "None", "...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Client.list_buckets
Get all buckets in the project associated to the client. This will not populate the list of blobs available in each bucket. .. literalinclude:: snippets.py :start-after: [START list_buckets] :end-before: [END list_buckets] This implements "storage.buckets.list"...
storage/google/cloud/storage/client.py
def list_buckets( self, max_results=None, page_token=None, prefix=None, projection="noAcl", fields=None, project=None, ): """Get all buckets in the project associated to the client. This will not populate the list of blobs available in each ...
def list_buckets( self, max_results=None, page_token=None, prefix=None, projection="noAcl", fields=None, project=None, ): """Get all buckets in the project associated to the client. This will not populate the list of blobs available in each ...
[ "Get", "all", "buckets", "in", "the", "project", "associated", "to", "the", "client", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/storage/google/cloud/storage/client.py#L290-L371
[ "def", "list_buckets", "(", "self", ",", "max_results", "=", "None", ",", "page_token", "=", "None", ",", "prefix", "=", "None", ",", "projection", "=", "\"noAcl\"", ",", "fields", "=", "None", ",", "project", "=", "None", ",", ")", ":", "if", "project...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_make_job_id
Construct an ID for a new job. :type job_id: str or ``NoneType`` :param job_id: the user-provided job ID :type prefix: str or ``NoneType`` :param prefix: (Optional) the user-provided prefix for a job ID :rtype: str :returns: A job ID
bigquery/google/cloud/bigquery/client.py
def _make_job_id(job_id, prefix=None): """Construct an ID for a new job. :type job_id: str or ``NoneType`` :param job_id: the user-provided job ID :type prefix: str or ``NoneType`` :param prefix: (Optional) the user-provided prefix for a job ID :rtype: str :returns: A job ID """ i...
def _make_job_id(job_id, prefix=None): """Construct an ID for a new job. :type job_id: str or ``NoneType`` :param job_id: the user-provided job ID :type prefix: str or ``NoneType`` :param prefix: (Optional) the user-provided prefix for a job ID :rtype: str :returns: A job ID """ i...
[ "Construct", "an", "ID", "for", "a", "new", "job", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/client.py#L2059-L2076
[ "def", "_make_job_id", "(", "job_id", ",", "prefix", "=", "None", ")", ":", "if", "job_id", "is", "not", "None", ":", "return", "job_id", "elif", "prefix", "is", "not", "None", ":", "return", "str", "(", "prefix", ")", "+", "str", "(", "uuid", ".", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
_check_mode
Check that a stream was opened in read-binary mode. :type stream: IO[bytes] :param stream: A bytes IO object open for reading. :raises: :exc:`ValueError` if the ``stream.mode`` is a valid attribute and is not among ``rb``, ``r+b`` or ``rb+``.
bigquery/google/cloud/bigquery/client.py
def _check_mode(stream): """Check that a stream was opened in read-binary mode. :type stream: IO[bytes] :param stream: A bytes IO object open for reading. :raises: :exc:`ValueError` if the ``stream.mode`` is a valid attribute and is not among ``rb``, ``r+b`` or ``rb+``. """ mode =...
def _check_mode(stream): """Check that a stream was opened in read-binary mode. :type stream: IO[bytes] :param stream: A bytes IO object open for reading. :raises: :exc:`ValueError` if the ``stream.mode`` is a valid attribute and is not among ``rb``, ``r+b`` or ``rb+``. """ mode =...
[ "Check", "that", "a", "stream", "was", "opened", "in", "read", "-", "binary", "mode", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/client.py#L2079-L2101
[ "def", "_check_mode", "(", "stream", ")", ":", "mode", "=", "getattr", "(", "stream", ",", "\"mode\"", ",", "None", ")", "if", "isinstance", "(", "stream", ",", "gzip", ".", "GzipFile", ")", ":", "if", "mode", "!=", "gzip", ".", "READ", ":", "raise",...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Client.get_service_account_email
Get the email address of the project's BigQuery service account Note: This is the service account that BigQuery uses to manage tables encrypted by a key in KMS. Args: project (str, optional): Project ID to use for retreiving service account email. ...
bigquery/google/cloud/bigquery/client.py
def get_service_account_email(self, project=None): """Get the email address of the project's BigQuery service account Note: This is the service account that BigQuery uses to manage tables encrypted by a key in KMS. Args: project (str, optional): ...
def get_service_account_email(self, project=None): """Get the email address of the project's BigQuery service account Note: This is the service account that BigQuery uses to manage tables encrypted by a key in KMS. Args: project (str, optional): ...
[ "Get", "the", "email", "address", "of", "the", "project", "s", "BigQuery", "service", "account" ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/client.py#L164-L191
[ "def", "get_service_account_email", "(", "self", ",", "project", "=", "None", ")", ":", "if", "project", "is", "None", ":", "project", "=", "self", ".", "project", "path", "=", "\"/projects/%s/serviceAccount\"", "%", "(", "project", ",", ")", "api_response", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Client.list_projects
List projects for the project associated with this client. See https://cloud.google.com/bigquery/docs/reference/rest/v2/projects/list :type max_results: int :param max_results: (Optional) maximum number of projects to return, If not passed, defaults to a val...
bigquery/google/cloud/bigquery/client.py
def list_projects(self, max_results=None, page_token=None, retry=DEFAULT_RETRY): """List projects for the project associated with this client. See https://cloud.google.com/bigquery/docs/reference/rest/v2/projects/list :type max_results: int :param max_results: (Optional) maximu...
def list_projects(self, max_results=None, page_token=None, retry=DEFAULT_RETRY): """List projects for the project associated with this client. See https://cloud.google.com/bigquery/docs/reference/rest/v2/projects/list :type max_results: int :param max_results: (Optional) maximu...
[ "List", "projects", "for", "the", "project", "associated", "with", "this", "client", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/client.py#L193-L227
[ "def", "list_projects", "(", "self", ",", "max_results", "=", "None", ",", "page_token", "=", "None", ",", "retry", "=", "DEFAULT_RETRY", ")", ":", "return", "page_iterator", ".", "HTTPIterator", "(", "client", "=", "self", ",", "api_request", "=", "functool...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Client.list_datasets
List datasets for the project associated with this client. See https://cloud.google.com/bigquery/docs/reference/rest/v2/datasets/list Args: project (str): Optional. Project ID to use for retreiving datasets. Defaults to the client's project. ...
bigquery/google/cloud/bigquery/client.py
def list_datasets( self, project=None, include_all=False, filter=None, max_results=None, page_token=None, retry=DEFAULT_RETRY, ): """List datasets for the project associated with this client. See https://cloud.google.com/bigquery/docs/...
def list_datasets( self, project=None, include_all=False, filter=None, max_results=None, page_token=None, retry=DEFAULT_RETRY, ): """List datasets for the project associated with this client. See https://cloud.google.com/bigquery/docs/...
[ "List", "datasets", "for", "the", "project", "associated", "with", "this", "client", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/client.py#L229-L291
[ "def", "list_datasets", "(", "self", ",", "project", "=", "None", ",", "include_all", "=", "False", ",", "filter", "=", "None", ",", "max_results", "=", "None", ",", "page_token", "=", "None", ",", "retry", "=", "DEFAULT_RETRY", ",", ")", ":", "extra_par...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Client.dataset
Construct a reference to a dataset. :type dataset_id: str :param dataset_id: ID of the dataset. :type project: str :param project: (Optional) project ID for the dataset (defaults to the project of the client). :rtype: :class:`google.cloud.bigquery.datas...
bigquery/google/cloud/bigquery/client.py
def dataset(self, dataset_id, project=None): """Construct a reference to a dataset. :type dataset_id: str :param dataset_id: ID of the dataset. :type project: str :param project: (Optional) project ID for the dataset (defaults to the project of the clien...
def dataset(self, dataset_id, project=None): """Construct a reference to a dataset. :type dataset_id: str :param dataset_id: ID of the dataset. :type project: str :param project: (Optional) project ID for the dataset (defaults to the project of the clien...
[ "Construct", "a", "reference", "to", "a", "dataset", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/client.py#L293-L309
[ "def", "dataset", "(", "self", ",", "dataset_id", ",", "project", "=", "None", ")", ":", "if", "project", "is", "None", ":", "project", "=", "self", ".", "project", "return", "DatasetReference", "(", "project", ",", "dataset_id", ")" ]
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Client.create_dataset
API call: create the dataset via a POST request. See https://cloud.google.com/bigquery/docs/reference/rest/v2/tables/insert Args: dataset (Union[ \ :class:`~google.cloud.bigquery.dataset.Dataset`, \ :class:`~google.cloud.bigquery.dataset.DatasetRefer...
bigquery/google/cloud/bigquery/client.py
def create_dataset(self, dataset, exists_ok=False, retry=DEFAULT_RETRY): """API call: create the dataset via a POST request. See https://cloud.google.com/bigquery/docs/reference/rest/v2/tables/insert Args: dataset (Union[ \ :class:`~google.cloud.bigquery.dat...
def create_dataset(self, dataset, exists_ok=False, retry=DEFAULT_RETRY): """API call: create the dataset via a POST request. See https://cloud.google.com/bigquery/docs/reference/rest/v2/tables/insert Args: dataset (Union[ \ :class:`~google.cloud.bigquery.dat...
[ "API", "call", ":", "create", "the", "dataset", "via", "a", "POST", "request", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/client.py#L311-L363
[ "def", "create_dataset", "(", "self", ",", "dataset", ",", "exists_ok", "=", "False", ",", "retry", "=", "DEFAULT_RETRY", ")", ":", "if", "isinstance", "(", "dataset", ",", "str", ")", ":", "dataset", "=", "DatasetReference", ".", "from_string", "(", "data...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Client.create_table
API call: create a table via a PUT request See https://cloud.google.com/bigquery/docs/reference/rest/v2/tables/insert Args: table (Union[ \ :class:`~google.cloud.bigquery.table.Table`, \ :class:`~google.cloud.bigquery.table.TableReference`, \ ...
bigquery/google/cloud/bigquery/client.py
def create_table(self, table, exists_ok=False, retry=DEFAULT_RETRY): """API call: create a table via a PUT request See https://cloud.google.com/bigquery/docs/reference/rest/v2/tables/insert Args: table (Union[ \ :class:`~google.cloud.bigquery.table.Table`, ...
def create_table(self, table, exists_ok=False, retry=DEFAULT_RETRY): """API call: create a table via a PUT request See https://cloud.google.com/bigquery/docs/reference/rest/v2/tables/insert Args: table (Union[ \ :class:`~google.cloud.bigquery.table.Table`, ...
[ "API", "call", ":", "create", "a", "table", "via", "a", "PUT", "request" ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/client.py#L365-L401
[ "def", "create_table", "(", "self", ",", "table", ",", "exists_ok", "=", "False", ",", "retry", "=", "DEFAULT_RETRY", ")", ":", "table", "=", "_table_arg_to_table", "(", "table", ",", "default_project", "=", "self", ".", "project", ")", "path", "=", "\"/pr...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Client.get_dataset
Fetch the dataset referenced by ``dataset_ref`` Args: dataset_ref (Union[ \ :class:`~google.cloud.bigquery.dataset.DatasetReference`, \ str, \ ]): A reference to the dataset to fetch from the BigQuery API. If a string is pa...
bigquery/google/cloud/bigquery/client.py
def get_dataset(self, dataset_ref, retry=DEFAULT_RETRY): """Fetch the dataset referenced by ``dataset_ref`` Args: dataset_ref (Union[ \ :class:`~google.cloud.bigquery.dataset.DatasetReference`, \ str, \ ]): A reference to the datas...
def get_dataset(self, dataset_ref, retry=DEFAULT_RETRY): """Fetch the dataset referenced by ``dataset_ref`` Args: dataset_ref (Union[ \ :class:`~google.cloud.bigquery.dataset.DatasetReference`, \ str, \ ]): A reference to the datas...
[ "Fetch", "the", "dataset", "referenced", "by", "dataset_ref" ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/client.py#L409-L434
[ "def", "get_dataset", "(", "self", ",", "dataset_ref", ",", "retry", "=", "DEFAULT_RETRY", ")", ":", "if", "isinstance", "(", "dataset_ref", ",", "str", ")", ":", "dataset_ref", "=", "DatasetReference", ".", "from_string", "(", "dataset_ref", ",", "default_pro...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Client.get_model
[Beta] Fetch the model referenced by ``model_ref``. Args: model_ref (Union[ \ :class:`~google.cloud.bigquery.model.ModelReference`, \ str, \ ]): A reference to the model to fetch from the BigQuery API. If a string is passe...
bigquery/google/cloud/bigquery/client.py
def get_model(self, model_ref, retry=DEFAULT_RETRY): """[Beta] Fetch the model referenced by ``model_ref``. Args: model_ref (Union[ \ :class:`~google.cloud.bigquery.model.ModelReference`, \ str, \ ]): A reference to the model to f...
def get_model(self, model_ref, retry=DEFAULT_RETRY): """[Beta] Fetch the model referenced by ``model_ref``. Args: model_ref (Union[ \ :class:`~google.cloud.bigquery.model.ModelReference`, \ str, \ ]): A reference to the model to f...
[ "[", "Beta", "]", "Fetch", "the", "model", "referenced", "by", "model_ref", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/client.py#L436-L461
[ "def", "get_model", "(", "self", ",", "model_ref", ",", "retry", "=", "DEFAULT_RETRY", ")", ":", "if", "isinstance", "(", "model_ref", ",", "str", ")", ":", "model_ref", "=", "ModelReference", ".", "from_string", "(", "model_ref", ",", "default_project", "="...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Client.get_table
Fetch the table referenced by ``table``. Args: table (Union[ \ :class:`~google.cloud.bigquery.table.Table`, \ :class:`~google.cloud.bigquery.table.TableReference`, \ str, \ ]): A reference to the table to fetch from the Big...
bigquery/google/cloud/bigquery/client.py
def get_table(self, table, retry=DEFAULT_RETRY): """Fetch the table referenced by ``table``. Args: table (Union[ \ :class:`~google.cloud.bigquery.table.Table`, \ :class:`~google.cloud.bigquery.table.TableReference`, \ str, \ ]): ...
def get_table(self, table, retry=DEFAULT_RETRY): """Fetch the table referenced by ``table``. Args: table (Union[ \ :class:`~google.cloud.bigquery.table.Table`, \ :class:`~google.cloud.bigquery.table.TableReference`, \ str, \ ]): ...
[ "Fetch", "the", "table", "referenced", "by", "table", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/client.py#L463-L485
[ "def", "get_table", "(", "self", ",", "table", ",", "retry", "=", "DEFAULT_RETRY", ")", ":", "table_ref", "=", "_table_arg_to_table_ref", "(", "table", ",", "default_project", "=", "self", ".", "project", ")", "api_response", "=", "self", ".", "_call_api", "...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Client.update_dataset
Change some fields of a dataset. Use ``fields`` to specify which fields to update. At least one field must be provided. If a field is listed in ``fields`` and is ``None`` in ``dataset``, it will be deleted. If ``dataset.etag`` is not ``None``, the update will only succeed if th...
bigquery/google/cloud/bigquery/client.py
def update_dataset(self, dataset, fields, retry=DEFAULT_RETRY): """Change some fields of a dataset. Use ``fields`` to specify which fields to update. At least one field must be provided. If a field is listed in ``fields`` and is ``None`` in ``dataset``, it will be deleted. If `...
def update_dataset(self, dataset, fields, retry=DEFAULT_RETRY): """Change some fields of a dataset. Use ``fields`` to specify which fields to update. At least one field must be provided. If a field is listed in ``fields`` and is ``None`` in ``dataset``, it will be deleted. If `...
[ "Change", "some", "fields", "of", "a", "dataset", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/client.py#L487-L521
[ "def", "update_dataset", "(", "self", ",", "dataset", ",", "fields", ",", "retry", "=", "DEFAULT_RETRY", ")", ":", "partial", "=", "dataset", ".", "_build_resource", "(", "fields", ")", "if", "dataset", ".", "etag", "is", "not", "None", ":", "headers", "...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Client.update_model
[Beta] Change some fields of a model. Use ``fields`` to specify which fields to update. At least one field must be provided. If a field is listed in ``fields`` and is ``None`` in ``model``, it will be deleted. If ``model.etag`` is not ``None``, the update will only succeed if t...
bigquery/google/cloud/bigquery/client.py
def update_model(self, model, fields, retry=DEFAULT_RETRY): """[Beta] Change some fields of a model. Use ``fields`` to specify which fields to update. At least one field must be provided. If a field is listed in ``fields`` and is ``None`` in ``model``, it will be deleted. If ``...
def update_model(self, model, fields, retry=DEFAULT_RETRY): """[Beta] Change some fields of a model. Use ``fields`` to specify which fields to update. At least one field must be provided. If a field is listed in ``fields`` and is ``None`` in ``model``, it will be deleted. If ``...
[ "[", "Beta", "]", "Change", "some", "fields", "of", "a", "model", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/client.py#L523-L556
[ "def", "update_model", "(", "self", ",", "model", ",", "fields", ",", "retry", "=", "DEFAULT_RETRY", ")", ":", "partial", "=", "model", ".", "_build_resource", "(", "fields", ")", "if", "model", ".", "etag", ":", "headers", "=", "{", "\"If-Match\"", ":",...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Client.update_table
Change some fields of a table. Use ``fields`` to specify which fields to update. At least one field must be provided. If a field is listed in ``fields`` and is ``None`` in ``table``, it will be deleted. If ``table.etag`` is not ``None``, the update will only succeed if the tabl...
bigquery/google/cloud/bigquery/client.py
def update_table(self, table, fields, retry=DEFAULT_RETRY): """Change some fields of a table. Use ``fields`` to specify which fields to update. At least one field must be provided. If a field is listed in ``fields`` and is ``None`` in ``table``, it will be deleted. If ``table.e...
def update_table(self, table, fields, retry=DEFAULT_RETRY): """Change some fields of a table. Use ``fields`` to specify which fields to update. At least one field must be provided. If a field is listed in ``fields`` and is ``None`` in ``table``, it will be deleted. If ``table.e...
[ "Change", "some", "fields", "of", "a", "table", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/client.py#L558-L591
[ "def", "update_table", "(", "self", ",", "table", ",", "fields", ",", "retry", "=", "DEFAULT_RETRY", ")", ":", "partial", "=", "table", ".", "_build_resource", "(", "fields", ")", "if", "table", ".", "etag", "is", "not", "None", ":", "headers", "=", "{...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Client.list_models
[Beta] List models in the dataset. See https://cloud.google.com/bigquery/docs/reference/rest/v2/models/list Args: dataset (Union[ \ :class:`~google.cloud.bigquery.dataset.Dataset`, \ :class:`~google.cloud.bigquery.dataset.DatasetReference`, \ ...
bigquery/google/cloud/bigquery/client.py
def list_models( self, dataset, max_results=None, page_token=None, retry=DEFAULT_RETRY ): """[Beta] List models in the dataset. See https://cloud.google.com/bigquery/docs/reference/rest/v2/models/list Args: dataset (Union[ \ :class:`~google.cloud...
def list_models( self, dataset, max_results=None, page_token=None, retry=DEFAULT_RETRY ): """[Beta] List models in the dataset. See https://cloud.google.com/bigquery/docs/reference/rest/v2/models/list Args: dataset (Union[ \ :class:`~google.cloud...
[ "[", "Beta", "]", "List", "models", "in", "the", "dataset", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/client.py#L593-L649
[ "def", "list_models", "(", "self", ",", "dataset", ",", "max_results", "=", "None", ",", "page_token", "=", "None", ",", "retry", "=", "DEFAULT_RETRY", ")", ":", "if", "isinstance", "(", "dataset", ",", "str", ")", ":", "dataset", "=", "DatasetReference", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Client.delete_dataset
Delete a dataset. See https://cloud.google.com/bigquery/docs/reference/rest/v2/datasets/delete Args dataset (Union[ \ :class:`~google.cloud.bigquery.dataset.Dataset`, \ :class:`~google.cloud.bigquery.dataset.DatasetReference`, \ str, ...
bigquery/google/cloud/bigquery/client.py
def delete_dataset( self, dataset, delete_contents=False, retry=DEFAULT_RETRY, not_found_ok=False ): """Delete a dataset. See https://cloud.google.com/bigquery/docs/reference/rest/v2/datasets/delete Args dataset (Union[ \ :class:`~google.cloud.bi...
def delete_dataset( self, dataset, delete_contents=False, retry=DEFAULT_RETRY, not_found_ok=False ): """Delete a dataset. See https://cloud.google.com/bigquery/docs/reference/rest/v2/datasets/delete Args dataset (Union[ \ :class:`~google.cloud.bi...
[ "Delete", "a", "dataset", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/client.py#L709-L755
[ "def", "delete_dataset", "(", "self", ",", "dataset", ",", "delete_contents", "=", "False", ",", "retry", "=", "DEFAULT_RETRY", ",", "not_found_ok", "=", "False", ")", ":", "if", "isinstance", "(", "dataset", ",", "str", ")", ":", "dataset", "=", "DatasetR...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Client.delete_model
[Beta] Delete a model See https://cloud.google.com/bigquery/docs/reference/rest/v2/models/delete Args: model (Union[ \ :class:`~google.cloud.bigquery.model.Model`, \ :class:`~google.cloud.bigquery.model.ModelReference`, \ str, \ ...
bigquery/google/cloud/bigquery/client.py
def delete_model(self, model, retry=DEFAULT_RETRY, not_found_ok=False): """[Beta] Delete a model See https://cloud.google.com/bigquery/docs/reference/rest/v2/models/delete Args: model (Union[ \ :class:`~google.cloud.bigquery.model.Model`, \ :...
def delete_model(self, model, retry=DEFAULT_RETRY, not_found_ok=False): """[Beta] Delete a model See https://cloud.google.com/bigquery/docs/reference/rest/v2/models/delete Args: model (Union[ \ :class:`~google.cloud.bigquery.model.Model`, \ :...
[ "[", "Beta", "]", "Delete", "a", "model" ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/client.py#L757-L789
[ "def", "delete_model", "(", "self", ",", "model", ",", "retry", "=", "DEFAULT_RETRY", ",", "not_found_ok", "=", "False", ")", ":", "if", "isinstance", "(", "model", ",", "str", ")", ":", "model", "=", "ModelReference", ".", "from_string", "(", "model", "...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Client.delete_table
Delete a table See https://cloud.google.com/bigquery/docs/reference/rest/v2/tables/delete Args: table (Union[ \ :class:`~google.cloud.bigquery.table.Table`, \ :class:`~google.cloud.bigquery.table.TableReference`, \ str, \ ...
bigquery/google/cloud/bigquery/client.py
def delete_table(self, table, retry=DEFAULT_RETRY, not_found_ok=False): """Delete a table See https://cloud.google.com/bigquery/docs/reference/rest/v2/tables/delete Args: table (Union[ \ :class:`~google.cloud.bigquery.table.Table`, \ :class:`...
def delete_table(self, table, retry=DEFAULT_RETRY, not_found_ok=False): """Delete a table See https://cloud.google.com/bigquery/docs/reference/rest/v2/tables/delete Args: table (Union[ \ :class:`~google.cloud.bigquery.table.Table`, \ :class:`...
[ "Delete", "a", "table" ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/client.py#L791-L821
[ "def", "delete_table", "(", "self", ",", "table", ",", "retry", "=", "DEFAULT_RETRY", ",", "not_found_ok", "=", "False", ")", ":", "table", "=", "_table_arg_to_table_ref", "(", "table", ",", "default_project", "=", "self", ".", "project", ")", "if", "not", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Client._get_query_results
Get the query results object for a query job. Arguments: job_id (str): Name of the query job. retry (google.api_core.retry.Retry): (Optional) How to retry the RPC. project (str): (Optional) project ID for the query job (defaults to the ...
bigquery/google/cloud/bigquery/client.py
def _get_query_results( self, job_id, retry, project=None, timeout_ms=None, location=None ): """Get the query results object for a query job. Arguments: job_id (str): Name of the query job. retry (google.api_core.retry.Retry): (Optional) How to retry ...
def _get_query_results( self, job_id, retry, project=None, timeout_ms=None, location=None ): """Get the query results object for a query job. Arguments: job_id (str): Name of the query job. retry (google.api_core.retry.Retry): (Optional) How to retry ...
[ "Get", "the", "query", "results", "object", "for", "a", "query", "job", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/client.py#L823-L867
[ "def", "_get_query_results", "(", "self", ",", "job_id", ",", "retry", ",", "project", "=", "None", ",", "timeout_ms", "=", "None", ",", "location", "=", "None", ")", ":", "extra_params", "=", "{", "\"maxResults\"", ":", "0", "}", "if", "project", "is", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Client.job_from_resource
Detect correct job type from resource and instantiate. :type resource: dict :param resource: one job resource from API response :rtype: One of: :class:`google.cloud.bigquery.job.LoadJob`, :class:`google.cloud.bigquery.job.CopyJob`, :class:`google...
bigquery/google/cloud/bigquery/client.py
def job_from_resource(self, resource): """Detect correct job type from resource and instantiate. :type resource: dict :param resource: one job resource from API response :rtype: One of: :class:`google.cloud.bigquery.job.LoadJob`, :class:`google.cloud.big...
def job_from_resource(self, resource): """Detect correct job type from resource and instantiate. :type resource: dict :param resource: one job resource from API response :rtype: One of: :class:`google.cloud.bigquery.job.LoadJob`, :class:`google.cloud.big...
[ "Detect", "correct", "job", "type", "from", "resource", "and", "instantiate", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/client.py#L869-L891
[ "def", "job_from_resource", "(", "self", ",", "resource", ")", ":", "config", "=", "resource", ".", "get", "(", "\"configuration\"", ",", "{", "}", ")", "if", "\"load\"", "in", "config", ":", "return", "job", ".", "LoadJob", ".", "from_api_repr", "(", "r...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Client.cancel_job
Attempt to cancel a job from a job ID. See https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/cancel Arguments: job_id (str): Unique job identifier. Keyword Arguments: project (str): (Optional) ID of the project which owns the job (de...
bigquery/google/cloud/bigquery/client.py
def cancel_job(self, job_id, project=None, location=None, retry=DEFAULT_RETRY): """Attempt to cancel a job from a job ID. See https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/cancel Arguments: job_id (str): Unique job identifier. Keyword Arguments: ...
def cancel_job(self, job_id, project=None, location=None, retry=DEFAULT_RETRY): """Attempt to cancel a job from a job ID. See https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/cancel Arguments: job_id (str): Unique job identifier. Keyword Arguments: ...
[ "Attempt", "to", "cancel", "a", "job", "from", "a", "job", "ID", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/client.py#L936-L977
[ "def", "cancel_job", "(", "self", ",", "job_id", ",", "project", "=", "None", ",", "location", "=", "None", ",", "retry", "=", "DEFAULT_RETRY", ")", ":", "extra_params", "=", "{", "\"projection\"", ":", "\"full\"", "}", "if", "project", "is", "None", ":"...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Client.list_jobs
List jobs for the project associated with this client. See https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/list Args: project (str, optional): Project ID to use for retreiving datasets. Defaults to the client's project. max_...
bigquery/google/cloud/bigquery/client.py
def list_jobs( self, project=None, max_results=None, page_token=None, all_users=None, state_filter=None, retry=DEFAULT_RETRY, min_creation_time=None, max_creation_time=None, ): """List jobs for the project associated with this client. ...
def list_jobs( self, project=None, max_results=None, page_token=None, all_users=None, state_filter=None, retry=DEFAULT_RETRY, min_creation_time=None, max_creation_time=None, ): """List jobs for the project associated with this client. ...
[ "List", "jobs", "for", "the", "project", "associated", "with", "this", "client", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/client.py#L979-L1060
[ "def", "list_jobs", "(", "self", ",", "project", "=", "None", ",", "max_results", "=", "None", ",", "page_token", "=", "None", ",", "all_users", "=", "None", ",", "state_filter", "=", "None", ",", "retry", "=", "DEFAULT_RETRY", ",", "min_creation_time", "=...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Client.load_table_from_uri
Starts a job for loading data into a table from CloudStorage. See https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#configuration.load Arguments: source_uris (Union[str, Sequence[str]]): URIs of data files to be loaded; in format ``gs://<...
bigquery/google/cloud/bigquery/client.py
def load_table_from_uri( self, source_uris, destination, job_id=None, job_id_prefix=None, location=None, project=None, job_config=None, retry=DEFAULT_RETRY, ): """Starts a job for loading data into a table from CloudStorage. Se...
def load_table_from_uri( self, source_uris, destination, job_id=None, job_id_prefix=None, location=None, project=None, job_config=None, retry=DEFAULT_RETRY, ): """Starts a job for loading data into a table from CloudStorage. Se...
[ "Starts", "a", "job", "for", "loading", "data", "into", "a", "table", "from", "CloudStorage", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/client.py#L1062-L1129
[ "def", "load_table_from_uri", "(", "self", ",", "source_uris", ",", "destination", ",", "job_id", "=", "None", ",", "job_id_prefix", "=", "None", ",", "location", "=", "None", ",", "project", "=", "None", ",", "job_config", "=", "None", ",", "retry", "=", ...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Client.load_table_from_file
Upload the contents of this table from a file-like object. Similar to :meth:`load_table_from_uri`, this method creates, starts and returns a :class:`~google.cloud.bigquery.job.LoadJob`. Arguments: file_obj (file): A file handle opened in binary mode for reading. destina...
bigquery/google/cloud/bigquery/client.py
def load_table_from_file( self, file_obj, destination, rewind=False, size=None, num_retries=_DEFAULT_NUM_RETRIES, job_id=None, job_id_prefix=None, location=None, project=None, job_config=None, ): """Upload the contents o...
def load_table_from_file( self, file_obj, destination, rewind=False, size=None, num_retries=_DEFAULT_NUM_RETRIES, job_id=None, job_id_prefix=None, location=None, project=None, job_config=None, ): """Upload the contents o...
[ "Upload", "the", "contents", "of", "this", "table", "from", "a", "file", "-", "like", "object", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/client.py#L1131-L1223
[ "def", "load_table_from_file", "(", "self", ",", "file_obj", ",", "destination", ",", "rewind", "=", "False", ",", "size", "=", "None", ",", "num_retries", "=", "_DEFAULT_NUM_RETRIES", ",", "job_id", "=", "None", ",", "job_id_prefix", "=", "None", ",", "loca...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Client.load_table_from_dataframe
Upload the contents of a table from a pandas DataFrame. Similar to :meth:`load_table_from_uri`, this method creates, starts and returns a :class:`~google.cloud.bigquery.job.LoadJob`. Arguments: dataframe (pandas.DataFrame): A :class:`~pandas.DataFrame` containing th...
bigquery/google/cloud/bigquery/client.py
def load_table_from_dataframe( self, dataframe, destination, num_retries=_DEFAULT_NUM_RETRIES, job_id=None, job_id_prefix=None, location=None, project=None, job_config=None, ): """Upload the contents of a table from a pandas DataFrame. ...
def load_table_from_dataframe( self, dataframe, destination, num_retries=_DEFAULT_NUM_RETRIES, job_id=None, job_id_prefix=None, location=None, project=None, job_config=None, ): """Upload the contents of a table from a pandas DataFrame. ...
[ "Upload", "the", "contents", "of", "a", "table", "from", "a", "pandas", "DataFrame", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/client.py#L1225-L1309
[ "def", "load_table_from_dataframe", "(", "self", ",", "dataframe", ",", "destination", ",", "num_retries", "=", "_DEFAULT_NUM_RETRIES", ",", "job_id", "=", "None", ",", "job_id_prefix", "=", "None", ",", "location", "=", "None", ",", "project", "=", "None", ",...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Client._do_resumable_upload
Perform a resumable upload. :type stream: IO[bytes] :param stream: A bytes IO object open for reading. :type metadata: dict :param metadata: The metadata associated with the upload. :type num_retries: int :param num_retries: Number of upload retries. (Deprecated: This ...
bigquery/google/cloud/bigquery/client.py
def _do_resumable_upload(self, stream, metadata, num_retries): """Perform a resumable upload. :type stream: IO[bytes] :param stream: A bytes IO object open for reading. :type metadata: dict :param metadata: The metadata associated with the upload. :type num_retries: in...
def _do_resumable_upload(self, stream, metadata, num_retries): """Perform a resumable upload. :type stream: IO[bytes] :param stream: A bytes IO object open for reading. :type metadata: dict :param metadata: The metadata associated with the upload. :type num_retries: in...
[ "Perform", "a", "resumable", "upload", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/client.py#L1311-L1335
[ "def", "_do_resumable_upload", "(", "self", ",", "stream", ",", "metadata", ",", "num_retries", ")", ":", "upload", ",", "transport", "=", "self", ".", "_initiate_resumable_upload", "(", "stream", ",", "metadata", ",", "num_retries", ")", "while", "not", "uplo...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Client._initiate_resumable_upload
Initiate a resumable upload. :type stream: IO[bytes] :param stream: A bytes IO object open for reading. :type metadata: dict :param metadata: The metadata associated with the upload. :type num_retries: int :param num_retries: Number of upload retries. (Deprecated: This...
bigquery/google/cloud/bigquery/client.py
def _initiate_resumable_upload(self, stream, metadata, num_retries): """Initiate a resumable upload. :type stream: IO[bytes] :param stream: A bytes IO object open for reading. :type metadata: dict :param metadata: The metadata associated with the upload. :type num_retr...
def _initiate_resumable_upload(self, stream, metadata, num_retries): """Initiate a resumable upload. :type stream: IO[bytes] :param stream: A bytes IO object open for reading. :type metadata: dict :param metadata: The metadata associated with the upload. :type num_retr...
[ "Initiate", "a", "resumable", "upload", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/client.py#L1337-L1375
[ "def", "_initiate_resumable_upload", "(", "self", ",", "stream", ",", "metadata", ",", "num_retries", ")", ":", "chunk_size", "=", "_DEFAULT_CHUNKSIZE", "transport", "=", "self", ".", "_http", "headers", "=", "_get_upload_headers", "(", "self", ".", "_connection",...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Client._do_multipart_upload
Perform a multipart upload. :type stream: IO[bytes] :param stream: A bytes IO object open for reading. :type metadata: dict :param metadata: The metadata associated with the upload. :type size: int :param size: The number of bytes to be uploaded (which will be read ...
bigquery/google/cloud/bigquery/client.py
def _do_multipart_upload(self, stream, metadata, size, num_retries): """Perform a multipart upload. :type stream: IO[bytes] :param stream: A bytes IO object open for reading. :type metadata: dict :param metadata: The metadata associated with the upload. :type size: int...
def _do_multipart_upload(self, stream, metadata, size, num_retries): """Perform a multipart upload. :type stream: IO[bytes] :param stream: A bytes IO object open for reading. :type metadata: dict :param metadata: The metadata associated with the upload. :type size: int...
[ "Perform", "a", "multipart", "upload", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/client.py#L1377-L1418
[ "def", "_do_multipart_upload", "(", "self", ",", "stream", ",", "metadata", ",", "size", ",", "num_retries", ")", ":", "data", "=", "stream", ".", "read", "(", "size", ")", "if", "len", "(", "data", ")", "<", "size", ":", "msg", "=", "_READ_LESS_THAN_S...
85e80125a59cb10f8cb105f25ecc099e4b940b50
train
Client.copy_table
Copy one or more tables to another table. See https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#configuration.copy Arguments: sources (Union[ \ :class:`~google.cloud.bigquery.table.Table`, \ :class:`~google.cloud.bigquery.table.TableRefer...
bigquery/google/cloud/bigquery/client.py
def copy_table( self, sources, destination, job_id=None, job_id_prefix=None, location=None, project=None, job_config=None, retry=DEFAULT_RETRY, ): """Copy one or more tables to another table. See https://cloud.google.co...
def copy_table( self, sources, destination, job_id=None, job_id_prefix=None, location=None, project=None, job_config=None, retry=DEFAULT_RETRY, ): """Copy one or more tables to another table. See https://cloud.google.co...
[ "Copy", "one", "or", "more", "tables", "to", "another", "table", "." ]
googleapis/google-cloud-python
python
https://github.com/googleapis/google-cloud-python/blob/85e80125a59cb10f8cb105f25ecc099e4b940b50/bigquery/google/cloud/bigquery/client.py#L1420-L1509
[ "def", "copy_table", "(", "self", ",", "sources", ",", "destination", ",", "job_id", "=", "None", ",", "job_id_prefix", "=", "None", ",", "location", "=", "None", ",", "project", "=", "None", ",", "job_config", "=", "None", ",", "retry", "=", "DEFAULT_RE...
85e80125a59cb10f8cb105f25ecc099e4b940b50