Skip to main content

intermediate_tables

Creates, updates, deletes, gets or lists an intermediate_tables resource.

Overview

Nameintermediate_tables
TypeResource
Idaws.cleanrooms.intermediate_tables

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe unique identifier of the intermediate table. (pattern: <code>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}</code>)
namestringThe name of the intermediate table. (pattern: <code>(?!\s*$)[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDBFF-\uDC00\uDFFF\t]*</code>)
analysis_rule_typesarrayThe types of analysis rules associated with the intermediate table.
arnstringThe Amazon Resource Name (ARN) of the intermediate table. (pattern: <code>arn:aws:cleanrooms:[\w]{2}-[\w]{4,9}-[\d]:[\d]{12}:membership/[\d\w-]+/intermediatetable/[\d\w-]+</code>)
child_resourcesarrayThe child resources that depend on this intermediate table.
collaboration_arnstringThe Amazon Resource Name (ARN) of the collaboration that contains the intermediate table. (pattern: <code>arn:aws:[\w]+:[\w]{2}-[\w]{4,9}-[\d]:[\d]{12}:collaboration/[\d\w-]+</code>)
collaboration_idstringThe unique identifier of the collaboration that contains the intermediate table. (pattern: <code>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}</code>)
create_timestring (date-time)The time the intermediate table was created.
descriptionstringThe description of the intermediate table. (pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDBFF-\uDC00\uDFFF\t\r\n]*</code>)
intermediate_table_versionobjectThe details of the currently active version of the intermediate table.
kms_key_arnstringThe Amazon Resource Name (ARN) of the KMS key used to encrypt the intermediate table data. (pattern: <code>arn:aws:kms:[\w]{2}-[\w]{4,9}-[\d]:[\d]{12}:key/[a-zA-Z0-9-]+</code>)
membership_arnstringThe Amazon Resource Name (ARN) of the membership that contains the intermediate table. (pattern: <code>arn:aws:[\w]+:[\w]{2}-[\w]{4,9}-[\d]:[\d]{12}:membership/[\d\w-]+</code>)
membership_idstringThe unique identifier of the membership that contains the intermediate table. (pattern: <code>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}</code>)
population_analysis_configurationobjectContains the configuration that defines the analysis used to populate an intermediate table.
retention_in_daysintegerThe number of days that populated data is retained before expiring.
schemaobjectThe schema of the intermediate table, containing column definitions. Available after the table has been successfully populated.
statusstringThe current status of the intermediate table. (CREATED, POPULATE_STARTED, POPULATE_SUCCESS, POPULATE_FAILED, DISALLOWED_BY_DATA_PROVIDER, BASE_TABLE_REMOVED, RETENTION_PERIOD_EXPIRED)
status_reasonstringThe reason for the current status of the intermediate table.
table_dependenciesarrayThe list of base tables that this intermediate table depends on.
update_timestring (date-time)The time the intermediate table was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_intermediate_tableselectintermediate_table_identifier, membership_identifier, regionRetrieves an intermediate table. Returns the full details of the intermediate table, including schema, table dependencies, inherited constraints, child resources, and status. Only the intermediate table owner can call this operation.
list_intermediate_tablesselectmembership_identifier, regionnextToken, maxResultsLists intermediate tables owned by the caller in a membership. We recommend using pagination to ensure that the operation returns quickly and successfully.
create_intermediate_tableinsertmembership_identifier, region, name, populationAnalysisConfigurationCreates an intermediate table in a membership. The intermediate table is owned by the member with the CAN_QUERY ability. To populate the table with results, use PopulateIntermediateTable.
update_intermediate_tableupdateintermediate_table_identifier, membership_identifier, regionUpdates an intermediate table. You can update the description, KMS key ARN, and column types of existing columns. Only the intermediate table owner can call this operation.
delete_intermediate_tabledeletemembership_identifier, intermediate_table_identifier, regionDeletes an intermediate table. The delete is idempotent. Only the intermediate table owner can call this operation.
disallow_intermediate_tableexecmembership_identifier, region, intermediateTableNameMarks an intermediate table as invalid when it references the caller's base table. The data provider (base table owner) calls this operation, not the intermediate table owner. By default, the operation also marks all descendant intermediate tables as invalid.
populate_intermediate_tableexecintermediate_table_identifier, membership_identifier, regionRuns the stored query of an intermediate table and makes the results available for querying. Each call creates a new version. Use GetProtectedQuery with the returned analysis ID to track progress. Only the intermediate table owner can call this operation.

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.

NameDatatypeDescription
intermediate_table_identifierstringThe unique identifier of the intermediate table to populate.
membership_identifierstringThe unique identifier of the membership that contains the intermediate table.
regionstringAWS region (default: us-east-1)
maxResultsintegerThe 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.
nextTokenstringThe pagination token that's used to fetch the next set of results.

SELECT examples

Retrieves an intermediate table. Returns the full details of the intermediate table, including schema, table dependencies, inherited constraints, child resources, and status. Only the intermediate table owner can call this operation.

SELECT
id,
name,
analysis_rule_types,
arn,
child_resources,
collaboration_arn,
collaboration_id,
create_time,
description,
intermediate_table_version,
kms_key_arn,
membership_arn,
membership_id,
population_analysis_configuration,
retention_in_days,
schema,
status,
status_reason,
table_dependencies,
update_time
FROM aws.cleanrooms.intermediate_tables
WHERE intermediate_table_identifier = '{{ intermediate_table_identifier }}' -- required
AND membership_identifier = '{{ membership_identifier }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates an intermediate table in a membership. The intermediate table is owned by the member with the CAN_QUERY ability. To populate the table with results, use PopulateIntermediateTable.

INSERT INTO aws.cleanrooms.intermediate_tables (
name,
description,
populationAnalysisConfiguration,
kmsKeyArn,
retentionInDays,
tags,
membership_identifier,
region
)
SELECT
'{{ name }}' /* required */,
'{{ description }}',
'{{ populationAnalysisConfiguration }}' /* required */,
'{{ kmsKeyArn }}',
{{ retentionInDays }},
'{{ tags }}',
'{{ membership_identifier }}',
'{{ region }}'
RETURNING
intermediate_table
;

UPDATE examples

Updates an intermediate table. You can update the description, KMS key ARN, and column types of existing columns. Only the intermediate table owner can call this operation.

UPDATE aws.cleanrooms.intermediate_tables
SET
description = '{{ description }}',
kmsKeyArn = '{{ kmsKeyArn }}',
columns = '{{ columns }}'
WHERE
intermediate_table_identifier = '{{ intermediate_table_identifier }}' --required
AND membership_identifier = '{{ membership_identifier }}' --required
AND region = '{{ region }}' --required
RETURNING
intermediate_table;

DELETE examples

Deletes an intermediate table. The delete is idempotent. Only the intermediate table owner can call this operation.

DELETE FROM aws.cleanrooms.intermediate_tables
WHERE membership_identifier = '{{ membership_identifier }}' --required
AND intermediate_table_identifier = '{{ intermediate_table_identifier }}' --required
AND region = '{{ region }}' --required
;

Lifecycle Methods

Marks an intermediate table as invalid when it references the caller's base table. The data provider (base table owner) calls this operation, not the intermediate table owner. By default, the operation also marks all descendant intermediate tables as invalid.

EXEC aws.cleanrooms.intermediate_tables.disallow_intermediate_table
@membership_identifier='{{ membership_identifier }}' --required,
@region='{{ region }}' --required
@@json=
'{
"intermediateTableName": "{{ intermediateTableName }}",
"includeDescendants": {{ includeDescendants }}
}'
;