Skip to content

aws.cleanrooms.get_protected_query

Example SQL Queries

SELECT * FROM
aws.cleanrooms.get_protected_query
WHERE
"membership_identifier" = 'VALUE'
AND "protected_query_identifier" = 'VALUE';

Description

Returns query processing metadata.

Table Definition

Column NameColumn Data Type
membership_identifier Required Input Column

The identifier for a membership in a protected query instance.

VARCHAR
protected_query_identifier Required Input Column

The identifier for a protected query instance.

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
protected_query

The query processing metadata.

STRUCT(
"id" VARCHAR,
"membership_id" VARCHAR,
"membership_arn" VARCHAR,
"create_time" TIMESTAMP_S,
"sql_parameters" STRUCT(
"query_string" VARCHAR,
"analysis_template_arn" VARCHAR,
"parameters" MAP(VARCHAR, VARCHAR)
),
"status" VARCHAR,
"result_configuration" STRUCT(
"output_configuration" STRUCT(
"s3" STRUCT(
"result_format" VARCHAR,
"bucket" VARCHAR,
"key_prefix" VARCHAR
),
"member" STRUCT(
"account_id" VARCHAR
)
)
),
"statistics" STRUCT(
"total_duration_in_millis" BIGINT
),
"result" STRUCT(
"output" STRUCT(
"s3" STRUCT(
"location" VARCHAR
),
"member_list" STRUCT(
"account_id" VARCHAR
)[]
)
),
"error" STRUCT(
"message" VARCHAR,
"code" VARCHAR
),
"differential_privacy" STRUCT(
"sensitivity_parameters" STRUCT(
"aggregation_type" VARCHAR,
"aggregation_expression" VARCHAR,
"user_contribution_limit" BIGINT,
"min_column_value" DOUBLE,
"max_column_value" DOUBLE
)[]
)
)
Show child fields
protected_query.create_time

The time at which the protected query was created.

protected_query.differential_privacy

The sensitivity parameters of the differential privacy results of the protected query.

Show child fields
protected_query.differential_privacy.sensitivity_parameters[]
Show child fields
protected_query.differential_privacy.sensitivity_parameters[].aggregation_expression

The aggregation expression that was run.

protected_query.differential_privacy.sensitivity_parameters[].aggregation_type

The type of aggregation function that was run.

protected_query.differential_privacy.sensitivity_parameters[].max_column_value

The upper bound of the aggregation expression.

protected_query.differential_privacy.sensitivity_parameters[].min_column_value

The lower bound of the aggregation expression.

protected_query.differential_privacy.sensitivity_parameters[].user_contribution_limit

The maximum number of rows contributed by a user in a SQL query.

protected_query.error

An error thrown by the protected query.

Show child fields
protected_query.error.code

An error code for the error.

protected_query.error.message

A description of why the query failed.

protected_query.id

The identifier for a protected query instance.

protected_query.membership_arn

The ARN of the membership.

protected_query.membership_id

The identifier for the membership.

protected_query.result

The result of the protected query.

Show child fields
protected_query.result.output

The output of the protected query.

Show child fields
protected_query.result.output.member_list[]
Show child fields
protected_query.result.output.member_list[].account_id

The Amazon Web Services account ID of the member in the collaboration who can receive results for the query.

protected_query.result.output.s3

If present, the output for a protected query with an `S3` output type.

Show child fields
protected_query.result.output.s3.location

The S3 location of the result.

protected_query.result_configuration

Contains any details needed to write the query results.

Show child fields
protected_query.result_configuration.output_configuration

Configuration for protected query results.

Show child fields
protected_query.result_configuration.output_configuration.member

Required configuration for a protected query with a member output type.

Show child fields
protected_query.result_configuration.output_configuration.member.account_id

The unique identifier for the account.

protected_query.result_configuration.output_configuration.s3

Required configuration for a protected query with an s3 output type.

Show child fields
protected_query.result_configuration.output_configuration.s3.bucket

The S3 bucket to unload the protected query results.

protected_query.result_configuration.output_configuration.s3.key_prefix

The S3 prefix to unload the protected query results.

protected_query.result_configuration.output_configuration.s3.result_format

Intended file format of the result.

protected_query.sql_parameters

The protected query SQL parameters.

Show child fields
protected_query.sql_parameters.analysis_template_arn

The Amazon Resource Name (ARN) associated with the analysis template within a collaboration.

protected_query.sql_parameters.parameters

The protected query SQL parameters.

protected_query.sql_parameters.query_string

The query string to be submitted.

protected_query.statistics

Statistics about protected query execution.

Show child fields
protected_query.statistics.total_duration_in_millis

The duration of the protected query, from creation until query completion.

protected_query.status

The status of the query.