content
Creates, updates, deletes, gets or lists a content
resource.
Overview
Name | content |
Type | Resource |
Id | google.dataplex.content |
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_content_get | SELECT | contentId, lakesId, locationsId, projectsId | Get a content resource. |
projects_locations_lakes_content_list | SELECT | lakesId, locationsId, projectsId | List content. |
projects_locations_lakes_content_create | INSERT | lakesId, locationsId, projectsId | Create a content. |
projects_locations_lakes_content_delete | DELETE | contentId, lakesId, locationsId, projectsId | Delete a content. |
projects_locations_lakes_content_patch | UPDATE | contentId, 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.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.
- All Properties
- Manifest
/*+ 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 }}'
;
- 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 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 }}';