Skip to main content

entities

Creates, updates, deletes, gets or lists an entities resource.

Overview

Nameentities
TypeResource
Idgoogle.dataplex.entities

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
idstringRequired. 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.
namestringOutput only. The resource name of the entity, of the form: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{id}.
accessobjectOutput only. Identifies the access mechanism to the entity. Not user settable. (id: GoogleCloudDataplexV1StorageAccess)
assetstringRequired. 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.
catalogEntrystringOutput only. The name of the associated Data Catalog entry.
compatibilityobjectOutput only. Metadata stores that the entity is compatible with. (id: GoogleCloudDataplexV1EntityCompatibilityStatus)
createTimestring (google-datetime)Output only. The time when the entity was created.
dataPathstringRequired. 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.
dataPathPatternstringOptional. 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.
descriptionstringOptional. User friendly longer description text. Must be shorter than or equal to 1024 characters.
displayNamestringOptional. Display name must be shorter than or equal to 256 characters.
etagstringOptional. The etag associated with the entity, which can be retrieved with a GetEntity request. Required for update and delete requests.
formatobjectRequired. Identifies the storage format of the entity data. It does not apply to entities with data stored in BigQuery. (id: GoogleCloudDataplexV1StorageFormat)
schemaobjectRequired. 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)
systemstringRequired. Immutable. Identifies the storage system of the entity data.
typestringRequired. Immutable. The type of entity.
uidstringOutput 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.
updateTimestring (google-datetime)Output only. The time when the entity was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_locations_lakes_zones_entities_getselectprojectsId, locationsId, lakesId, zonesId, entitiesIdviewGet a metadata entity.
projects_locations_lakes_zones_entities_listselectprojectsId, locationsId, lakesId, zonesIdview, pageSize, pageToken, filterList metadata entities in a zone.
projects_locations_lakes_zones_entities_createinsertprojectsId, locationsId, lakesId, zonesIdvalidateOnlyCreate a metadata entity.
projects_locations_lakes_zones_entities_updatereplaceprojectsId, locationsId, lakesId, zonesId, entitiesIdvalidateOnlyUpdate a metadata entity. Only supports full resource update.
projects_locations_lakes_zones_entities_deletedeleteprojectsId, locationsId, lakesId, zonesId, entitiesIdetagDelete 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.

NameDatatypeDescription
entitiesIdstring
lakesIdstring
locationsIdstring
projectsIdstring
zonesIdstring
etagstring
filterstring
pageSizeinteger (int32)
pageTokenstring
validateOnlyboolean
viewstring

SELECT examples

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 }}';

INSERT examples

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
;

REPLACE examples

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

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 }}';