instructions
Creates, updates, deletes, gets or lists an instructions
resource.
Overview
Name | instructions |
Type | Resource |
Id | google.datalabeling.instructions |
Fields
The following fields are returned by SELECT
queries:
- projects_instructions_get
- projects_instructions_list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. Instruction resource name, format: projects/{project_id}/instructions/{instruction_id} |
blockingResources | array | Output only. The names of any related resources that are blocking changes to the instruction. |
createTime | string (google-datetime) | Output only. Creation time of instruction. |
csvInstruction | object | Deprecated: this instruction format is not supported any more. Instruction from a CSV file, such as for classification task. The CSV file should have exact two columns, in the following format: * The first column is labeled data, such as an image reference, text. * The second column is comma separated labels associated with data. (id: GoogleCloudDatalabelingV1beta1CsvInstruction) |
dataType | string | Required. The data type of this instruction. |
description | string | Optional. User-provided description of the instruction. The description can be up to 10000 characters long. |
displayName | string | Required. The display name of the instruction. Maximum of 64 characters. |
pdfInstruction | object | Instruction from a PDF document. The PDF should be in a Cloud Storage bucket. (id: GoogleCloudDatalabelingV1beta1PdfInstruction) |
updateTime | string (google-datetime) | Output only. Last update time of instruction. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. Instruction resource name, format: projects/{project_id}/instructions/{instruction_id} |
blockingResources | array | Output only. The names of any related resources that are blocking changes to the instruction. |
createTime | string (google-datetime) | Output only. Creation time of instruction. |
csvInstruction | object | Deprecated: this instruction format is not supported any more. Instruction from a CSV file, such as for classification task. The CSV file should have exact two columns, in the following format: * The first column is labeled data, such as an image reference, text. * The second column is comma separated labels associated with data. (id: GoogleCloudDatalabelingV1beta1CsvInstruction) |
dataType | string | Required. The data type of this instruction. |
description | string | Optional. User-provided description of the instruction. The description can be up to 10000 characters long. |
displayName | string | Required. The display name of the instruction. Maximum of 64 characters. |
pdfInstruction | object | Instruction from a PDF document. The PDF should be in a Cloud Storage bucket. (id: GoogleCloudDatalabelingV1beta1PdfInstruction) |
updateTime | string (google-datetime) | Output only. Last update time of instruction. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
projects_instructions_get | select | projectsId , instructionsId | Gets an instruction by resource name. | |
projects_instructions_list | select | projectsId | filter , pageSize , pageToken | Lists instructions for a project. Pagination is supported. |
projects_instructions_create | insert | projectsId | Creates an instruction for how data should be labeled. | |
projects_instructions_delete | delete | projectsId , instructionsId | Deletes an instruction object by resource name. |
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 |
---|---|---|
instructionsId | string | |
projectsId | string | |
filter | string | |
pageSize | integer (int32) | |
pageToken | string |
SELECT
examples
- projects_instructions_get
- projects_instructions_list
Gets an instruction by resource name.
SELECT
name,
blockingResources,
createTime,
csvInstruction,
dataType,
description,
displayName,
pdfInstruction,
updateTime
FROM google.datalabeling.instructions
WHERE projectsId = '{{ projectsId }}' -- required
AND instructionsId = '{{ instructionsId }}' -- required;
Lists instructions for a project. Pagination is supported.
SELECT
name,
blockingResources,
createTime,
csvInstruction,
dataType,
description,
displayName,
pdfInstruction,
updateTime
FROM google.datalabeling.instructions
WHERE projectsId = '{{ projectsId }}' -- required
AND filter = '{{ filter }}'
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
INSERT
examples
- projects_instructions_create
- Manifest
Creates an instruction for how data should be labeled.
INSERT INTO google.datalabeling.instructions (
data__instruction,
projectsId
)
SELECT
'{{ instruction }}',
'{{ projectsId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: instructions
props:
- name: projectsId
value: string
description: Required parameter for the instructions resource.
- name: instruction
value: object
description: >
Required. Instruction of how to perform the labeling task.
DELETE
examples
- projects_instructions_delete
Deletes an instruction object by resource name.
DELETE FROM google.datalabeling.instructions
WHERE projectsId = '{{ projectsId }}' --required
AND instructionsId = '{{ instructionsId }}' --required;