Define API Datasets.
Classes
AccessEntry
AccessEntry(
role: typing.Optional[str] = None,
entity_type: typing.Optional[str] = None,
entity_id: typing.Optional[typing.Union[typing.Dict[str, typing.Any], str]] = None,
**kwargs
)
Represents grant of an access role to an entity.
An entry must have exactly one of the allowed
xref_EntityTypes. If anything but view
, routine
,
or dataset
are set, a role
is also required. role
is omitted for view
,
routine
, dataset
, because they are always read-only.
See https://cloud.google.com/bigquery/docs/reference/rest/v2/datasets.
Parameters | |
---|---|
Name | Description |
role |
typing.Optional[str]
Role granted to the entity. The following string values are supported: |
entity_type |
typing.Optional[str]
Type of entity being granted the role. See EntityTypes for supported types. |
entity_id |
typing.Union[typing.Dict[str, typing.Any], str, NoneType]
If the |
Exceptions | |
---|---|
Type | Description |
ValueError |
If a view , routine , or dataset has role set, or a non view , non routine , and non dataset **does not** have a role set. .. rubric:: Examples >>> entry = AccessEntry('OWNER', 'userByEmail', 'user@example.com') >>> view = { ... 'projectId': 'my-project', ... 'datasetId': 'my_dataset', ... 'tableId': 'my_table' ... } >>> entry = AccessEntry(None, 'view', view) |
Condition
Condition(
expression: str,
title: typing.Optional[str] = None,
description: typing.Optional[str] = None,
)
Represents a textual expression in the Common Expression Language (CEL) syntax.
Typically used for filtering or policy rules, such as in IAM Conditions or BigQuery row/column access policies.
See: https://cloud.google.com/iam/docs/reference/rest/Shared.Types/Expr https://github.com/google/cel-spec
Parameters | |
---|---|
Name | Description |
expression |
str
The condition expression string using CEL syntax. This is required. Example: |
title |
Optional[str]
An optional title for the condition, providing a short summary. Example: |
description |
Optional[str]
An optional description of the condition, providing a detailed explanation. Example: |
Dataset
Dataset(dataset_ref)
Datasets are containers for tables.
See https://cloud.google.com/bigquery/docs/reference/rest/v2/datasets#resource-dataset
Parameter | |
---|---|
Name | Description |
dataset_ref |
Union[google.cloud.bigquery.dataset.DatasetReference, str] .. note:: Fields marked as "Output Only" are populated by the server and will only be available after calling get_dataset.
A pointer to a dataset. If |
DatasetListItem
DatasetListItem(resource)
A read-only dataset resource from a list operation.
For performance reasons, the BigQuery API only includes some of the dataset properties when listing datasets. Notably, xref_access_entries is missing.
For a full list of the properties that the BigQuery API returns, see the
REST documentation for datasets.list
<https://cloud.google.com/bigquery/docs/reference/rest/v2/datasets/list>
_.
Parameter | |
---|---|
Name | Description |
resource |
Dict[str, str]
A dataset-like resource object from a dataset list response. A |
Exceptions | |
---|---|
Type | Description |
ValueError |
If datasetReference or one of its required members is missing from resource . |
DatasetReference
DatasetReference(project: str, dataset_id: str)
DatasetReferences are pointers to datasets.
See https://cloud.google.com/bigquery/docs/reference/rest/v2/datasets#datasetreference
Parameters | |
---|---|
Name | Description |
project |
str
The ID of the project |
dataset_id |
str
The ID of the dataset |
Exceptions | |
---|---|
Type | Description |
ValueError |
If either argument is not of type str . |