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

NameDatatypeDescription
namestringOutput only. The resource name of the MetadataSchema.
descriptionstringDescription of the Metadata Schema
createTimestringOutput only. Timestamp when this MetadataSchema was created.
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

NameAccessible byRequired ParamsDescription
getSELECTlocationsId, metadataSchemasId, metadataStoresId, projectsIdRetrieves a specific MetadataSchema.
listSELECTlocationsId, metadataStoresId, projectsIdLists MetadataSchemas.
createINSERTlocationsId, metadataStoresId, projectsIdCreates a MetadataSchema.

SELECT examples

Lists MetadataSchemas.

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

INSERT example

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

/*+ create */
INSERT INTO google.aiplatform.metadata_schemas (
locationsId,
metadataStoresId,
projectsId,
schema,
schemaVersion,
schemaType,
description
)
SELECT
'{{ locationsId }}',
'{{ metadataStoresId }}',
'{{ projectsId }}',
'{{ schema }}',
'{{ schemaVersion }}',
'{{ schemaType }}',
'{{ description }}'
;