schemas
Creates, updates, deletes, gets or lists a schemas resource.
Overview
| Name | schemas |
| Type | Resource |
| Id | aws.cleanrooms.schemas |
Fields
The following fields are returned by SELECT queries:
- batch_get_schema
- get_schema
- list_schemas
| Name | Datatype | Description |
|---|---|---|
errors | array | Error reasons for schemas that could not be retrieved. One error is returned for every schema that could not be retrieved. |
schemas | array | The retrieved list of schemas. |
| Name | Datatype | Description |
|---|---|---|
name | string | A name for the schema. The schema relation is referred to by this name when queried by a protected query. (pattern: <code>[a-zA-Z0-9_](([a-zA-Z0-9_ ]+-)*([a-zA-Z0-9_ ]+))?</code>) |
analysis_method | string | The analysis method for the schema. DIRECT_QUERY allows SQL queries to be run directly on this table. DIRECT_JOB allows PySpark jobs to be run directly on this table. MULTIPLE allows both SQL queries and PySpark jobs to be run directly on this table. (DIRECT_QUERY, DIRECT_JOB, MULTIPLE) |
analysis_rule_types | array | The analysis rule types that are associated with the schema. Currently, only one entry is present. |
collaboration_arn | string | The unique Amazon Resource Name (ARN) for the collaboration that the schema belongs to. (pattern: <code>arn:aws:[\w]+:[\w]{2}-[\w]{4,9}-[\d]:[\d]{12}:collaboration/[\d\w-]+</code>) |
collaboration_id | string | The unique ID for the collaboration that the schema belongs to. (pattern: <code>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}</code>) |
columns | array | The columns for the relation that this schema represents. |
create_time | string (date-time) | The time at which the schema was created. |
creator_account_id | string | The unique account ID for the Amazon Web Services account that owns the schema. (pattern: <code>\d+</code>) |
description | string | A description for the schema. (pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDBFF-\uDC00\uDFFF\t\r\n]*</code>) |
partition_keys | array | The partition keys for the dataset underlying this schema. |
resource_arn | string | The Amazon Resource Name (ARN) of the schema resource. (pattern: <code>arn:aws:cleanrooms:[\w]{2}-[\w]{4,9}-[\d]:[\d]{12}:membership/[\d\w-]+/(configuredtableassociation|idmappingtable)/[\d\w-]+</code>) |
schema_status_details | array | Details about the status of the schema. Currently, only one entry is present. |
schema_type_properties | object | The schema type properties. |
selected_analysis_methods | array | The selected analysis methods for the schema. |
type_ | string | The type of schema. (TABLE, ID_MAPPING_TABLE, INTERMEDIATE_TABLE) |
update_time | string (date-time) | The most recent time at which the schema was updated. |
| Name | Datatype | Description |
|---|---|---|
name | string | The name for the schema object. (pattern: <code>[a-zA-Z0-9_](([a-zA-Z0-9_ ]+-)*([a-zA-Z0-9_ ]+))?</code>) |
analysis_method | string | The analysis method for the associated schema. DIRECT_QUERY allows SQL queries to be run directly on this table. DIRECT_JOB allows PySpark jobs to be run directly on this table. MULTIPLE allows both SQL queries and PySpark jobs to be run directly on this table. (DIRECT_QUERY, DIRECT_JOB, MULTIPLE) |
analysis_rule_types | array | The types of analysis rules that are associated with this schema object. |
collaboration_arn | string | The unique ARN for the collaboration that the schema belongs to. (pattern: <code>arn:aws:[\w]+:[\w]{2}-[\w]{4,9}-[\d]:[\d]{12}:collaboration/[\d\w-]+</code>) |
collaboration_id | string | The unique ID for the collaboration that the schema belongs to. (pattern: <code>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}</code>) |
create_time | string (date-time) | The time the schema object was created. |
creator_account_id | string | The unique account ID for the Amazon Web Services account that owns the schema. (pattern: <code>\d+</code>) |
resource_arn | string | The Amazon Resource Name (ARN) of the schema summary resource. (pattern: <code>arn:aws:cleanrooms:[\w]{2}-[\w]{4,9}-[\d]:[\d]{12}:membership/[\d\w-]+/(configuredtableassociation|idmappingtable)/[\d\w-]+</code>) |
selected_analysis_methods | array | The selected analysis methods for the schema. |
type_ | string | The type of schema object. (TABLE, ID_MAPPING_TABLE, INTERMEDIATE_TABLE) |
update_time | string (date-time) | The time the schema object was last updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
batch_get_schema | select | collaboration_identifier, region | Retrieves multiple schemas by their identifiers. | |
get_schema | select | collaboration_identifier, name, region | Retrieves the schema for a relation within a collaboration. | |
list_schemas | select | collaboration_identifier, region | schemaType, nextToken, maxResults | Lists the schemas for relations within a collaboration. |
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 |
|---|---|---|
collaboration_identifier | string | A unique identifier for the collaboration that the schema belongs to. Currently accepts a collaboration ID. |
name | string | The name of the relation to retrieve the schema for. |
region | string | AWS region (default: us-east-1) |
maxResults | integer | The maximum number of results that are returned for an API request call. The service chooses a default number if you don't set one. The service might return a nextToken even if the maxResults value has not been met. |
nextToken | string | The pagination token that's used to fetch the next set of results. |
schemaType | string | If present, filter schemas by schema type. |
SELECT examples
- batch_get_schema
- get_schema
- list_schemas
Retrieves multiple schemas by their identifiers.
SELECT
errors,
schemas
FROM aws.cleanrooms.schemas
WHERE collaboration_identifier = '{{ collaboration_identifier }}' -- required
AND region = '{{ region }}' -- required
;
Retrieves the schema for a relation within a collaboration.
SELECT
name,
analysis_method,
analysis_rule_types,
collaboration_arn,
collaboration_id,
columns,
create_time,
creator_account_id,
description,
partition_keys,
resource_arn,
schema_status_details,
schema_type_properties,
selected_analysis_methods,
type_,
update_time
FROM aws.cleanrooms.schemas
WHERE collaboration_identifier = '{{ collaboration_identifier }}' -- required
AND name = '{{ name }}' -- required
AND region = '{{ region }}' -- required
;
Lists the schemas for relations within a collaboration.
SELECT
name,
analysis_method,
analysis_rule_types,
collaboration_arn,
collaboration_id,
create_time,
creator_account_id,
resource_arn,
selected_analysis_methods,
type_,
update_time
FROM aws.cleanrooms.schemas
WHERE collaboration_identifier = '{{ collaboration_identifier }}' -- required
AND region = '{{ region }}' -- required
AND schemaType = '{{ schemaType }}'
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;