Skip to content

aws.cleanrooms.get_schema

Example SQL Queries

SELECT * FROM
aws.cleanrooms.get_schema
WHERE
"collaboration_identifier" = 'VALUE'
AND "name" = 'VALUE';

Description

Retrieves the schema for a relation within a collaboration.

Table Definition

Column NameColumn Data Type
collaboration_identifier Required Input Column

A unique identifier for the collaboration that the schema belongs to. Currently accepts a collaboration ID.

VARCHAR
name Required Input Column

The name of the relation to retrieve the schema for.

VARCHAR
_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

_aws_region Input Column

The AWS region to use.

VARCHAR
schema

The entire schema object.

STRUCT(
"columns" STRUCT(
"name" VARCHAR,
"type" VARCHAR
)[],
"partition_keys" STRUCT(
"name" VARCHAR,
"type" VARCHAR
)[],
"analysis_rule_types" VARCHAR[],
"analysis_method" VARCHAR,
"creator_account_id" VARCHAR,
"name" VARCHAR,
"collaboration_id" VARCHAR,
"collaboration_arn" VARCHAR,
"description" VARCHAR,
"create_time" TIMESTAMP_S,
"update_time" TIMESTAMP_S,
"type" VARCHAR,
"schema_status_details" STRUCT(
"status" VARCHAR,
"reasons" STRUCT(
"code" VARCHAR,
"message" VARCHAR
)[],
"analysis_rule_type" VARCHAR,
"configurations" VARCHAR[],
"analysis_type" VARCHAR
)[],
"schema_type_properties" STRUCT(
"id_mapping_table" STRUCT(
"id_mapping_table_input_source" STRUCT(
"id_namespace_association_id" VARCHAR,
"type" VARCHAR
)[]
)
)
)
Show child fields
schema.analysis_method

The analysis method for the schema. The only valid value is currently DIRECT_QUERY.

schema.analysis_rule_types[]
schema.collaboration_arn

The unique ARN for the collaboration that the schema belongs to.

schema.collaboration_id

The unique ID for the collaboration that the schema belongs to.

schema.columns[]
Show child fields
schema.columns[].name

The name of the column.

schema.columns[].type

The type of the column.

schema.create_time

The time the schema was created.

schema.creator_account_id

The unique account ID for the Amazon Web Services account that owns the schema.

schema.description

A description for the schema.

schema.name

A name for the schema. The schema relation is referred to by this name when queried by a protected query.

schema.partition_keys[]
Show child fields
schema.partition_keys[].name

The name of the column.

schema.partition_keys[].type

The type of the column.

schema.schema_status_details[]
Show child fields
schema.schema_status_details[].analysis_rule_type

The analysis rule type for which the schema status has been evaluated.

schema.schema_status_details[].analysis_type

The type of analysis that can be performed on the schema.

A schema can have an analysisType of DIRECT_ANALYSIS, ADDITIONAL_ANALYSIS_FOR_AUDIENCE_GENERATION, or both.

schema.schema_status_details[].configurations[]
schema.schema_status_details[].reasons[]
Show child fields
schema.schema_status_details[].reasons[].code

The schema status reason code.

schema.schema_status_details[].reasons[].message

An explanation of the schema status reason code.

schema.schema_status_details[].status

The status of the schema, indicating if it is ready to query.

schema.schema_type_properties

The schema type properties.

Show child fields
schema.schema_type_properties.id_mapping_table

The ID mapping table for the schema type properties.

Show child fields
schema.schema_type_properties.id_mapping_table.id_mapping_table_input_source[]
Show child fields
schema.schema_type_properties.id_mapping_table.id_mapping_table_input_source[].id_namespace_association_id

The unique identifier of the ID namespace association.

schema.schema_type_properties.id_mapping_table.id_mapping_table_input_source[].type

The type of the input source of the ID mapping table.

schema.type

The type of schema. The only valid value is currently `TABLE`.

schema.update_time

The time the schema was last updated.