entities
Creates, updates, deletes, gets or lists an entities
resource.
Overview
Name | entities |
Type | Resource |
Id | google.dataplex.entities |
Fields
The following fields are returned by SELECT
queries:
- projects_locations_lakes_zones_entities_get
- projects_locations_lakes_zones_entities_list
Successful response
Name | Datatype | Description |
---|---|---|
id | string | Required. A user-provided entity ID. It is mutable, and will be used as the published table name. Specifying a new ID in an update entity request will override the existing value. The ID must contain only letters (a-z, A-Z), numbers (0-9), and underscores, and consist of 256 or fewer characters. |
name | string | Output only. The resource name of the entity, of the form: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{id}. |
access | object | Output only. Identifies the access mechanism to the entity. Not user settable. (id: GoogleCloudDataplexV1StorageAccess) |
asset | string | Required. Immutable. The ID of the asset associated with the storage location containing the entity data. The entity must be with in the same zone with the asset. |
catalogEntry | string | Output only. The name of the associated Data Catalog entry. |
compatibility | object | Output only. Metadata stores that the entity is compatible with. (id: GoogleCloudDataplexV1EntityCompatibilityStatus) |
createTime | string (google-datetime) | Output only. The time when the entity was created. |
dataPath | string | Required. Immutable. The storage path of the entity data. For Cloud Storage data, this is the fully-qualified path to the entity, such as gs://bucket/path/to/data. For BigQuery data, this is the name of the table resource, such as projects/project_id/datasets/dataset_id/tables/table_id. |
dataPathPattern | string | Optional. The set of items within the data path constituting the data in the entity, represented as a glob path. Example: gs://bucket/path/to/data/**/*.csv. |
description | string | Optional. User friendly longer description text. Must be shorter than or equal to 1024 characters. |
displayName | string | Optional. Display name must be shorter than or equal to 256 characters. |
etag | string | Optional. The etag associated with the entity, which can be retrieved with a GetEntity request. Required for update and delete requests. |
format | object | Required. Identifies the storage format of the entity data. It does not apply to entities with data stored in BigQuery. (id: GoogleCloudDataplexV1StorageFormat) |
schema | object | Required. The description of the data structure and layout. The schema is not included in list responses. It is only included in SCHEMA and FULL entity views of a GetEntity response. (id: GoogleCloudDataplexV1Schema) |
system | string | Required. Immutable. Identifies the storage system of the entity data. |
type | string | Required. Immutable. The type of entity. |
uid | string | Output only. System generated unique ID for the Entity. This ID will be different if the Entity is deleted and re-created with the same name. |
updateTime | string (google-datetime) | Output only. The time when the entity was last updated. |
Successful response
Name | Datatype | Description |
---|---|---|
id | string | Required. A user-provided entity ID. It is mutable, and will be used as the published table name. Specifying a new ID in an update entity request will override the existing value. The ID must contain only letters (a-z, A-Z), numbers (0-9), and underscores, and consist of 256 or fewer characters. |
name | string | Output only. The resource name of the entity, of the form: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{id}. |
access | object | Output only. Identifies the access mechanism to the entity. Not user settable. (id: GoogleCloudDataplexV1StorageAccess) |
asset | string | Required. Immutable. The ID of the asset associated with the storage location containing the entity data. The entity must be with in the same zone with the asset. |
catalogEntry | string | Output only. The name of the associated Data Catalog entry. |
compatibility | object | Output only. Metadata stores that the entity is compatible with. (id: GoogleCloudDataplexV1EntityCompatibilityStatus) |
createTime | string (google-datetime) | Output only. The time when the entity was created. |
dataPath | string | Required. Immutable. The storage path of the entity data. For Cloud Storage data, this is the fully-qualified path to the entity, such as gs://bucket/path/to/data. For BigQuery data, this is the name of the table resource, such as projects/project_id/datasets/dataset_id/tables/table_id. |
dataPathPattern | string | Optional. The set of items within the data path constituting the data in the entity, represented as a glob path. Example: gs://bucket/path/to/data/**/*.csv. |
description | string | Optional. User friendly longer description text. Must be shorter than or equal to 1024 characters. |
displayName | string | Optional. Display name must be shorter than or equal to 256 characters. |
etag | string | Optional. The etag associated with the entity, which can be retrieved with a GetEntity request. Required for update and delete requests. |
format | object | Required. Identifies the storage format of the entity data. It does not apply to entities with data stored in BigQuery. (id: GoogleCloudDataplexV1StorageFormat) |
schema | object | Required. The description of the data structure and layout. The schema is not included in list responses. It is only included in SCHEMA and FULL entity views of a GetEntity response. (id: GoogleCloudDataplexV1Schema) |
system | string | Required. Immutable. Identifies the storage system of the entity data. |
type | string | Required. Immutable. The type of entity. |
uid | string | Output only. System generated unique ID for the Entity. This ID will be different if the Entity is deleted and re-created with the same name. |
updateTime | string (google-datetime) | Output only. The time when the entity was last updated. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
projects_locations_lakes_zones_entities_get | select | projectsId , locationsId , lakesId , zonesId , entitiesId | view | Get a metadata entity. |
projects_locations_lakes_zones_entities_list | select | projectsId , locationsId , lakesId , zonesId | view , pageSize , pageToken , filter | List metadata entities in a zone. |
projects_locations_lakes_zones_entities_create | insert | projectsId , locationsId , lakesId , zonesId | validateOnly | Create a metadata entity. |
projects_locations_lakes_zones_entities_update | replace | projectsId , locationsId , lakesId , zonesId , entitiesId | validateOnly | Update a metadata entity. Only supports full resource update. |
projects_locations_lakes_zones_entities_delete | delete | projectsId , locationsId , lakesId , zonesId , entitiesId | etag | Delete a metadata entity. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
entitiesId | string | |
lakesId | string | |
locationsId | string | |
projectsId | string | |
zonesId | string | |
etag | string | |
filter | string | |
pageSize | integer (int32) | |
pageToken | string | |
validateOnly | boolean | |
view | string |
SELECT
examples
- projects_locations_lakes_zones_entities_get
- projects_locations_lakes_zones_entities_list
Get a metadata entity.
SELECT
id,
name,
access,
asset,
catalogEntry,
compatibility,
createTime,
dataPath,
dataPathPattern,
description,
displayName,
etag,
format,
schema,
system,
type,
uid,
updateTime
FROM google.dataplex.entities
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND lakesId = '{{ lakesId }}' -- required
AND zonesId = '{{ zonesId }}' -- required
AND entitiesId = '{{ entitiesId }}' -- required
AND view = '{{ view }}';
List metadata entities in a zone.
SELECT
id,
name,
access,
asset,
catalogEntry,
compatibility,
createTime,
dataPath,
dataPathPattern,
description,
displayName,
etag,
format,
schema,
system,
type,
uid,
updateTime
FROM google.dataplex.entities
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND lakesId = '{{ lakesId }}' -- required
AND zonesId = '{{ zonesId }}' -- required
AND view = '{{ view }}'
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}';
INSERT
examples
- projects_locations_lakes_zones_entities_create
- Manifest
Create a metadata entity.
INSERT INTO google.dataplex.entities (
data__displayName,
data__description,
data__id,
data__etag,
data__type,
data__asset,
data__dataPath,
data__dataPathPattern,
data__system,
data__format,
data__schema,
projectsId,
locationsId,
lakesId,
zonesId,
validateOnly
)
SELECT
'{{ displayName }}',
'{{ description }}',
'{{ id }}',
'{{ etag }}',
'{{ type }}',
'{{ asset }}',
'{{ dataPath }}',
'{{ dataPathPattern }}',
'{{ system }}',
'{{ format }}',
'{{ schema }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ lakesId }}',
'{{ zonesId }}',
'{{ validateOnly }}'
RETURNING
id,
name,
access,
asset,
catalogEntry,
compatibility,
createTime,
dataPath,
dataPathPattern,
description,
displayName,
etag,
format,
schema,
system,
type,
uid,
updateTime
;
# Description fields are for documentation purposes
- name: entities
props:
- name: projectsId
value: string
description: Required parameter for the entities resource.
- name: locationsId
value: string
description: Required parameter for the entities resource.
- name: lakesId
value: string
description: Required parameter for the entities resource.
- name: zonesId
value: string
description: Required parameter for the entities resource.
- name: displayName
value: string
description: >
Optional. Display name must be shorter than or equal to 256 characters.
- name: description
value: string
description: >
Optional. User friendly longer description text. Must be shorter than or equal to 1024 characters.
- name: id
value: string
description: >
Required. A user-provided entity ID. It is mutable, and will be used as the published table name. Specifying a new ID in an update entity request will override the existing value. The ID must contain only letters (a-z, A-Z), numbers (0-9), and underscores, and consist of 256 or fewer characters.
- name: etag
value: string
description: >
Optional. The etag associated with the entity, which can be retrieved with a GetEntity request. Required for update and delete requests.
- name: type
value: string
description: >
Required. Immutable. The type of entity.
valid_values: ['TYPE_UNSPECIFIED', 'TABLE', 'FILESET']
- name: asset
value: string
description: >
Required. Immutable. The ID of the asset associated with the storage location containing the entity data. The entity must be with in the same zone with the asset.
- name: dataPath
value: string
description: >
Required. Immutable. The storage path of the entity data. For Cloud Storage data, this is the fully-qualified path to the entity, such as gs://bucket/path/to/data. For BigQuery data, this is the name of the table resource, such as projects/project_id/datasets/dataset_id/tables/table_id.
- name: dataPathPattern
value: string
description: >
Optional. The set of items within the data path constituting the data in the entity, represented as a glob path. Example: gs://bucket/path/to/data/**/*.csv.
- name: system
value: string
description: >
Required. Immutable. Identifies the storage system of the entity data.
valid_values: ['STORAGE_SYSTEM_UNSPECIFIED', 'CLOUD_STORAGE', 'BIGQUERY']
- name: format
value: object
description: >
Required. Identifies the storage format of the entity data. It does not apply to entities with data stored in BigQuery.
- name: schema
value: object
description: >
Required. The description of the data structure and layout. The schema is not included in list responses. It is only included in SCHEMA and FULL entity views of a GetEntity response.
- name: validateOnly
value: boolean
REPLACE
examples
- projects_locations_lakes_zones_entities_update
Update a metadata entity. Only supports full resource update.
REPLACE google.dataplex.entities
SET
data__displayName = '{{ displayName }}',
data__description = '{{ description }}',
data__id = '{{ id }}',
data__etag = '{{ etag }}',
data__type = '{{ type }}',
data__asset = '{{ asset }}',
data__dataPath = '{{ dataPath }}',
data__dataPathPattern = '{{ dataPathPattern }}',
data__system = '{{ system }}',
data__format = '{{ format }}',
data__schema = '{{ schema }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND lakesId = '{{ lakesId }}' --required
AND zonesId = '{{ zonesId }}' --required
AND entitiesId = '{{ entitiesId }}' --required
AND validateOnly = {{ validateOnly}}
RETURNING
id,
name,
access,
asset,
catalogEntry,
compatibility,
createTime,
dataPath,
dataPathPattern,
description,
displayName,
etag,
format,
schema,
system,
type,
uid,
updateTime;
DELETE
examples
- projects_locations_lakes_zones_entities_delete
Delete a metadata entity.
DELETE FROM google.dataplex.entities
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND lakesId = '{{ lakesId }}' --required
AND zonesId = '{{ zonesId }}' --required
AND entitiesId = '{{ entitiesId }}' --required
AND etag = '{{ etag }}';