Skip to main content

contentitems

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

Overview

Namecontentitems
TypeResource
Idgoogle.dataplex.contentitems

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_contentitems_getSELECTcontentitemsId, lakesId, locationsId, projectsIdGet a content resource.
projects_locations_lakes_contentitems_listSELECTlakesId, locationsId, projectsIdList content.
projects_locations_lakes_contentitems_createINSERTlakesId, locationsId, projectsIdCreate a content.
projects_locations_lakes_contentitems_deleteDELETEcontentitemsId, lakesId, locationsId, projectsIdDelete a content.
projects_locations_lakes_contentitems_patchUPDATEcontentitemsId, 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.contentitems
WHERE lakesId = '{{ lakesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

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

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

UPDATE example

Updates a contentitems resource.

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

DELETE example

Deletes the specified contentitems resource.

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