Skip to main content

content

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

Overview

Namecontent
TypeResource
Idgoogle.dataplex.content

Fields

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}
descriptionstringOptional. Description of the content.
createTimestringOutput only. Content creation time.
dataTextstringRequired. Content data in string format.
labelsobjectOptional. User defined labels for the content.
notebookobjectConfiguration for Notebook content.
pathstringRequired. The path for the Content file, represented as directory structure. Unique within a lake. Limited to alphanumerics, hyphens, underscores, dots and slashes.
sqlScriptobjectConfiguration for the Sql Script content.
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.
updateTimestringOutput only. The time when the content was last updated.

Methods

NameAccessible byRequired ParamsDescription
projects_locations_lakes_content_getSELECTcontentId, lakesId, locationsId, projectsIdGet a content resource.
projects_locations_lakes_content_listSELECTlakesId, locationsId, projectsIdList content.
projects_locations_lakes_content_createINSERTlakesId, locationsId, projectsIdCreate a content.
projects_locations_lakes_content_deleteDELETEcontentId, lakesId, locationsId, projectsIdDelete a content.
projects_locations_lakes_content_patchUPDATEcontentId, lakesId, locationsId, projectsIdUpdate a content. Only supports full resource update.

SELECT examples

List content.

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

INSERT example

Use the following StackQL query and manifest file to create a new content resource.

/*+ create */
INSERT INTO google.dataplex.content (
lakesId,
locationsId,
projectsId,
path,
labels,
description,
dataText,
sqlScript,
notebook
)
SELECT
'{{ lakesId }}',
'{{ locationsId }}',
'{{ projectsId }}',
'{{ path }}',
'{{ labels }}',
'{{ description }}',
'{{ dataText }}',
'{{ sqlScript }}',
'{{ notebook }}'
;

UPDATE example

Updates a content resource.

/*+ update */
UPDATE google.dataplex.content
SET
path = '{{ path }}',
labels = '{{ labels }}',
description = '{{ description }}',
dataText = '{{ dataText }}',
sqlScript = '{{ sqlScript }}',
notebook = '{{ notebook }}'
WHERE
contentId = '{{ contentId }}'
AND lakesId = '{{ lakesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified content resource.

/*+ delete */
DELETE FROM google.dataplex.content
WHERE contentId = '{{ contentId }}'
AND lakesId = '{{ lakesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';