datasets
Creates, updates, deletes, gets or lists a datasets
resource.
Overview
Name | datasets |
Type | Resource |
Id | google.datalabeling.datasets |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Output only. Dataset resource name, format is: projects/{project_id}/datasets/{dataset_id} |
description | string | Optional. User-provided description of the annotation specification set. The description can be up to 10000 characters long. |
blockingResources | array | Output only. The names of any related resources that are blocking changes to the dataset. |
createTime | string | Output only. Time the dataset is created. |
dataItemCount | string | Output only. The number of data items in the dataset. |
displayName | string | Required. The display name of the dataset. Maximum of 64 characters. |
inputConfigs | array | Output only. This is populated with the original input configs where ImportData is called. It is available only after the clients import data to this dataset. |
lastMigrateTime | string | Last time that the Dataset is migrated to AI Platform V2. If any of the AnnotatedDataset is migrated, the last_migration_time in Dataset is also updated. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
projects_datasets_get | SELECT | datasetsId, projectsId | Gets dataset by resource name. |
projects_datasets_list | SELECT | projectsId | Lists datasets under a project. Pagination is supported. |
projects_datasets_create | INSERT | projectsId | Creates dataset. If success return a Dataset resource. |
projects_datasets_delete | DELETE | datasetsId, projectsId | Deletes a dataset by resource name. |
projects_datasets_export_data | EXEC | datasetsId, projectsId | Exports data and annotations from dataset. |
projects_datasets_import_data | EXEC | datasetsId, projectsId | Imports data into dataset based on source locations defined in request. It can be called multiple times for the same dataset. Each dataset can only have one long running operation running on it. For example, no labeling task (also long running operation) can be started while importing is still ongoing. Vice versa. |
SELECT
examples
Lists datasets under a project. Pagination is supported.
SELECT
name,
description,
blockingResources,
createTime,
dataItemCount,
displayName,
inputConfigs,
lastMigrateTime
FROM google.datalabeling.datasets
WHERE projectsId = '{{ projectsId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new datasets
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.datalabeling.datasets (
projectsId,
dataset
)
SELECT
'{{ projectsId }}',
'{{ dataset }}'
;
- name: your_resource_model_name
props:
- name: dataset
value:
- name: name
value: string
- name: displayName
value: string
- name: description
value: string
- name: createTime
value: string
- name: inputConfigs
value:
- - name: textMetadata
value:
- name: languageCode
value: string
- name: gcsSource
value:
- name: inputUri
value: string
- name: mimeType
value: string
- name: bigquerySource
value:
- name: inputUri
value: string
- name: dataType
value: string
- name: annotationType
value: string
- name: classificationMetadata
value:
- name: isMultiLabel
value: boolean
- name: blockingResources
value:
- string
- name: dataItemCount
value: string
- name: lastMigrateTime
value: string
DELETE
example
Deletes the specified datasets
resource.
/*+ delete */
DELETE FROM google.datalabeling.datasets
WHERE datasetsId = '{{ datasetsId }}'
AND projectsId = '{{ projectsId }}';