Skip to main content

metadata_schemas

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

Overview

Namemetadata_schemas
TypeResource
Idgoogle.aiplatform.metadata_schemas

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringOutput only. The resource name of the MetadataSchema.
createTimestring (google-datetime)Output only. Timestamp when this MetadataSchema was created.
descriptionstringDescription of the Metadata Schema
schemastringRequired. The raw YAML string representation of the MetadataSchema. The combination of [MetadataSchema.version] and the schema name given by title in [MetadataSchema.schema] must be unique within a MetadataStore. The schema is defined as an OpenAPI 3.0.2 MetadataSchema Object
schemaTypestringThe type of the MetadataSchema. This is a property that identifies which metadata types will use the MetadataSchema.
schemaVersionstringThe version of the MetadataSchema. The version's format must match the following regular expression: ^[0-9]+.+.+$, which would allow to order/compare different versions. Example: 1.0.0, 1.0.1, etc.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, metadataStoresId, metadataSchemasIdRetrieves a specific MetadataSchema.
listselectprojectsId, locationsId, metadataStoresIdpageSize, pageToken, filterLists MetadataSchemas.
createinsertprojectsId, locationsId, metadataStoresIdmetadataSchemaIdCreates a MetadataSchema.

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.

NameDatatypeDescription
locationsIdstring
metadataSchemasIdstring
metadataStoresIdstring
projectsIdstring
filterstring
metadataSchemaIdstring
pageSizeinteger (int32)
pageTokenstring

SELECT examples

Retrieves a specific MetadataSchema.

SELECT
name,
createTime,
description,
schema,
schemaType,
schemaVersion
FROM google.aiplatform.metadata_schemas
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND metadataStoresId = '{{ metadataStoresId }}' -- required
AND metadataSchemasId = '{{ metadataSchemasId }}' -- required;

INSERT examples

Creates a MetadataSchema.

INSERT INTO google.aiplatform.metadata_schemas (
data__schemaVersion,
data__schema,
data__schemaType,
data__description,
projectsId,
locationsId,
metadataStoresId,
metadataSchemaId
)
SELECT
'{{ schemaVersion }}',
'{{ schema }}',
'{{ schemaType }}',
'{{ description }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ metadataStoresId }}',
'{{ metadataSchemaId }}'
RETURNING
name,
createTime,
description,
schema,
schemaType,
schemaVersion
;