contentitems
Creates, updates, deletes, gets or lists a contentitems
resource.
Overview
Name | contentitems |
Type | Resource |
Id | google.dataplex.contentitems |
Fields
The following fields are returned by SELECT
queries:
- projects_locations_lakes_contentitems_get
- projects_locations_lakes_contentitems_list
Successful response
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} |
createTime | string (google-datetime) | Output only. Content creation time. |
dataText | string | Required. Content data in string format. |
description | string | Optional. Description of the content. |
labels | object | Optional. User defined labels for the content. |
notebook | object | Notebook related configurations. (id: GoogleCloudDataplexV1ContentNotebook) |
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 | Sql Script related configurations. (id: GoogleCloudDataplexV1ContentSqlScript) |
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 (google-datetime) | Output only. The time when the content was last updated. |
Successful response
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} |
createTime | string (google-datetime) | Output only. Content creation time. |
dataText | string | Required. Content data in string format. |
description | string | Optional. Description of the content. |
labels | object | Optional. User defined labels for the content. |
notebook | object | Notebook related configurations. (id: GoogleCloudDataplexV1ContentNotebook) |
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 | Sql Script related configurations. (id: GoogleCloudDataplexV1ContentSqlScript) |
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 (google-datetime) | Output only. The time when the content was last updated. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
projects_locations_lakes_contentitems_get | select | projectsId , locationsId , lakesId , contentitemsId | view | Get a content resource. |
projects_locations_lakes_contentitems_list | select | projectsId , locationsId , lakesId | pageSize , pageToken , filter | List content. |
projects_locations_lakes_contentitems_create | insert | projectsId , locationsId , lakesId | validateOnly | Create a content. |
projects_locations_lakes_contentitems_patch | update | projectsId , locationsId , lakesId , contentitemsId | updateMask , validateOnly | Update a content. Only supports full resource update. |
projects_locations_lakes_contentitems_delete | delete | projectsId , locationsId , lakesId , contentitemsId | Delete 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.
Name | Datatype | Description |
---|---|---|
contentitemsId | string | |
lakesId | string | |
locationsId | string | |
projectsId | string | |
filter | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) | |
validateOnly | boolean | |
view | string |
SELECT
examples
- projects_locations_lakes_contentitems_get
- projects_locations_lakes_contentitems_list
Get a content resource.
SELECT
name,
createTime,
dataText,
description,
labels,
notebook,
path,
sqlScript,
uid,
updateTime
FROM google.dataplex.contentitems
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND lakesId = '{{ lakesId }}' -- required
AND contentitemsId = '{{ contentitemsId }}' -- required
AND view = '{{ view }}';
List content.
SELECT
name,
createTime,
dataText,
description,
labels,
notebook,
path,
sqlScript,
uid,
updateTime
FROM google.dataplex.contentitems
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND lakesId = '{{ lakesId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}';
INSERT
examples
- projects_locations_lakes_contentitems_create
- Manifest
Create a content.
INSERT INTO google.dataplex.contentitems (
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
;
# Description fields are for documentation purposes
- name: contentitems
props:
- name: projectsId
value: string
description: Required parameter for the contentitems resource.
- name: locationsId
value: string
description: Required parameter for the contentitems resource.
- name: lakesId
value: string
description: Required parameter for the contentitems resource.
- name: path
value: string
description: >
Required. The path for the Content file, represented as directory structure. Unique within a lake. Limited to alphanumerics, hyphens, underscores, dots and slashes.
- name: labels
value: object
description: >
Optional. User defined labels for the content.
- name: description
value: string
description: >
Optional. Description of the content.
- name: dataText
value: string
description: >
Required. Content data in string format.
- name: sqlScript
value: object
description: >
Sql Script related configurations.
- name: notebook
value: object
description: >
Notebook related configurations.
- name: validateOnly
value: boolean
UPDATE
examples
- projects_locations_lakes_contentitems_patch
Update a content. Only supports full resource update.
UPDATE google.dataplex.contentitems
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 contentitemsId = '{{ contentitemsId }}' --required
AND updateMask = '{{ updateMask}}'
AND validateOnly = {{ validateOnly}}
RETURNING
name,
createTime,
dataText,
description,
labels,
notebook,
path,
sqlScript,
uid,
updateTime;
DELETE
examples
- projects_locations_lakes_contentitems_delete
Delete a content.
DELETE FROM google.dataplex.contentitems
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND lakesId = '{{ lakesId }}' --required
AND contentitemsId = '{{ contentitemsId }}' --required;