contentitems
Creates, updates, deletes, gets or lists a contentitems
resource.
Overview
Name | contentitems |
Type | Resource |
Id | google.dataplex.contentitems |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Output only. The relative resource name of the content, of the form: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} |
description | string | Optional. Description of the content. |
createTime | string | Output only. Content creation time. |
dataText | string | Required. Content data in string format. |
labels | object | Optional. User defined labels for the content. |
notebook | object | Configuration for Notebook content. |
path | string | Required. The path for the Content file, represented as directory structure. Unique within a lake. Limited to alphanumerics, hyphens, underscores, dots and slashes. |
sqlScript | object | Configuration for the Sql Script content. |
uid | string | Output 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. |
updateTime | string | Output only. The time when the content was last updated. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
projects_locations_lakes_contentitems_get | SELECT | contentitemsId, lakesId, locationsId, projectsId | Get a content resource. |
projects_locations_lakes_contentitems_list | SELECT | lakesId, locationsId, projectsId | List content. |
projects_locations_lakes_contentitems_create | INSERT | lakesId, locationsId, projectsId | Create a content. |
projects_locations_lakes_contentitems_delete | DELETE | contentitemsId, lakesId, locationsId, projectsId | Delete a content. |
projects_locations_lakes_contentitems_patch | UPDATE | contentitemsId, lakesId, locationsId, projectsId | Update 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.
- All Properties
- Manifest
/*+ 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 }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: uid
value: string
- name: path
value: string
- name: createTime
value: string
- name: updateTime
value: string
- name: labels
value: object
- name: description
value: string
- name: dataText
value: string
- name: sqlScript
value:
- name: engine
value: string
- name: notebook
value:
- name: kernelType
value: string
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 }}';