Skip to main content

content

Creates, updates, deletes, gets or lists a content resource.

Overview

Namecontent
TypeResource
Idgoogle.dataplex.content

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringOutput only. The relative resource name of the content, of the form: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id}
createTimestring (google-datetime)Output only. Content creation time.
dataTextstringRequired. Content data in string format.
descriptionstringOptional. Description of the content.
labelsobjectOptional. User defined labels for the content.
notebookobjectNotebook related configurations. (id: GoogleCloudDataplexV1ContentNotebook)
pathstringRequired. The path for the Content file, represented as directory structure. Unique within a lake. Limited to alphanumerics, hyphens, underscores, dots and slashes.
sqlScriptobjectSql Script related configurations. (id: GoogleCloudDataplexV1ContentSqlScript)
uidstringOutput only. System generated globally unique ID for the content. This ID will be different if the content is deleted and re-created with the same name.
updateTimestring (google-datetime)Output only. The time when the content was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_locations_lakes_content_getselectprojectsId, locationsId, lakesId, contentIdviewGet a content resource.
projects_locations_lakes_content_listselectprojectsId, locationsId, lakesIdpageSize, pageToken, filterList content.
projects_locations_lakes_content_createinsertprojectsId, locationsId, lakesIdvalidateOnlyCreate a content.
projects_locations_lakes_content_patchupdateprojectsId, locationsId, lakesId, contentIdupdateMask, validateOnlyUpdate a content. Only supports full resource update.
projects_locations_lakes_content_deletedeleteprojectsId, locationsId, lakesId, contentIdDelete a content.

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
contentIdstring
lakesIdstring
locationsIdstring
projectsIdstring
filterstring
pageSizeinteger (int32)
pageTokenstring
updateMaskstring (google-fieldmask)
validateOnlyboolean
viewstring

SELECT examples

Get a content resource.

SELECT
name,
createTime,
dataText,
description,
labels,
notebook,
path,
sqlScript,
uid,
updateTime
FROM google.dataplex.content
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND lakesId = '{{ lakesId }}' -- required
AND contentId = '{{ contentId }}' -- required
AND view = '{{ view }}';

INSERT examples

Create a content.

INSERT INTO google.dataplex.content (
data__path,
data__labels,
data__description,
data__dataText,
data__sqlScript,
data__notebook,
projectsId,
locationsId,
lakesId,
validateOnly
)
SELECT
'{{ path }}',
'{{ labels }}',
'{{ description }}',
'{{ dataText }}',
'{{ sqlScript }}',
'{{ notebook }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ lakesId }}',
'{{ validateOnly }}'
RETURNING
name,
createTime,
dataText,
description,
labels,
notebook,
path,
sqlScript,
uid,
updateTime
;

UPDATE examples

Update a content. Only supports full resource update.

UPDATE google.dataplex.content
SET
data__path = '{{ path }}',
data__labels = '{{ labels }}',
data__description = '{{ description }}',
data__dataText = '{{ dataText }}',
data__sqlScript = '{{ sqlScript }}',
data__notebook = '{{ notebook }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND lakesId = '{{ lakesId }}' --required
AND contentId = '{{ contentId }}' --required
AND updateMask = '{{ updateMask}}'
AND validateOnly = {{ validateOnly}}
RETURNING
name,
createTime,
dataText,
description,
labels,
notebook,
path,
sqlScript,
uid,
updateTime;

DELETE examples

Delete a content.

DELETE FROM google.dataplex.content
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND lakesId = '{{ lakesId }}' --required
AND contentId = '{{ contentId }}' --required;