Skip to main content

instructions

Creates, updates, deletes, gets or lists a instructions resource.

Overview

Nameinstructions
TypeResource
Idgoogle.datalabeling.instructions

Fields

NameDatatypeDescription
namestringOutput only. Instruction resource name, format: projects/{project_id}/instructions/{instruction_id}
descriptionstringOptional. User-provided description of the instruction. The description can be up to 10000 characters long.
blockingResourcesarrayOutput only. The names of any related resources that are blocking changes to the instruction.
createTimestringOutput only. Creation time of instruction.
csvInstructionobjectDeprecated: this instruction format is not supported any more. Instruction from a CSV file.
dataTypestringRequired. The data type of this instruction.
displayNamestringRequired. The display name of the instruction. Maximum of 64 characters.
pdfInstructionobjectInstruction from a PDF file.
updateTimestringOutput only. Last update time of instruction.

Methods

NameAccessible byRequired ParamsDescription
projects_instructions_getSELECTinstructionsId, projectsIdGets an instruction by resource name.
projects_instructions_listSELECTprojectsIdLists instructions for a project. Pagination is supported.
projects_instructions_createINSERTprojectsIdCreates an instruction for how data should be labeled.
projects_instructions_deleteDELETEinstructionsId, projectsIdDeletes an instruction object by resource name.

SELECT examples

Lists instructions for a project. Pagination is supported.

SELECT
name,
description,
blockingResources,
createTime,
csvInstruction,
dataType,
displayName,
pdfInstruction,
updateTime
FROM google.datalabeling.instructions
WHERE projectsId = '{{ projectsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new instructions resource.

/*+ create */
INSERT INTO google.datalabeling.instructions (
projectsId,
instruction
)
SELECT
'{{ projectsId }}',
'{{ instruction }}'
;

DELETE example

Deletes the specified instructions resource.

/*+ delete */
DELETE FROM google.datalabeling.instructions
WHERE instructionsId = '{{ instructionsId }}'
AND projectsId = '{{ projectsId }}';