schemas
Creates, updates, deletes, gets or lists a schemas
resource.
Overview
Name | schemas |
Type | Resource |
Id | google.discoveryengine.schemas |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Immutable. The full resource name of the schema, in the format of projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema} . This field must be a UTF-8 encoded string with a length limit of 1024 characters. |
jsonSchema | string | The JSON representation of the schema. |
structSchema | object | The structured representation of the schema. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
projects_locations_collections_data_stores_schemas_get | SELECT | collectionsId, dataStoresId, locationsId, projectsId, schemasId | Gets a Schema. |
projects_locations_collections_data_stores_schemas_list | SELECT | collectionsId, dataStoresId, locationsId, projectsId | Gets a list of Schemas. |
projects_locations_data_stores_schemas_get | SELECT | dataStoresId, locationsId, projectsId, schemasId | Gets a Schema. |
projects_locations_data_stores_schemas_list | SELECT | dataStoresId, locationsId, projectsId | Gets a list of Schemas. |
projects_locations_collections_data_stores_schemas_create | INSERT | collectionsId, dataStoresId, locationsId, projectsId | Creates a Schema. |
projects_locations_data_stores_schemas_create | INSERT | dataStoresId, locationsId, projectsId | Creates a Schema. |
projects_locations_collections_data_stores_schemas_delete | DELETE | collectionsId, dataStoresId, locationsId, projectsId, schemasId | Deletes a Schema. |
projects_locations_data_stores_schemas_delete | DELETE | dataStoresId, locationsId, projectsId, schemasId | Deletes a Schema. |
projects_locations_collections_data_stores_schemas_patch | UPDATE | collectionsId, dataStoresId, locationsId, projectsId, schemasId | Updates a Schema. |
projects_locations_data_stores_schemas_patch | UPDATE | dataStoresId, locationsId, projectsId, schemasId | Updates a Schema. |
SELECT
examples
Gets a list of Schemas.
SELECT
name,
jsonSchema,
structSchema
FROM google.discoveryengine.schemas
WHERE dataStoresId = '{{ dataStoresId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new schemas
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.discoveryengine.schemas (
dataStoresId,
locationsId,
projectsId,
structSchema,
jsonSchema,
name
)
SELECT
'{{ dataStoresId }}',
'{{ locationsId }}',
'{{ projectsId }}',
'{{ structSchema }}',
'{{ jsonSchema }}',
'{{ name }}'
;
- name: your_resource_model_name
props:
- name: structSchema
value: object
- name: jsonSchema
value: string
- name: name
value: string
UPDATE
example
Updates a schemas
resource.
/*+ update */
UPDATE google.discoveryengine.schemas
SET
structSchema = '{{ structSchema }}',
jsonSchema = '{{ jsonSchema }}',
name = '{{ name }}'
WHERE
dataStoresId = '{{ dataStoresId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND schemasId = '{{ schemasId }}';
DELETE
example
Deletes the specified schemas
resource.
/*+ delete */
DELETE FROM google.discoveryengine.schemas
WHERE dataStoresId = '{{ dataStoresId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND schemasId = '{{ schemasId }}';