intermediate_tables
Creates, updates, deletes, gets or lists an intermediate_tables resource.
Overview
| Name | intermediate_tables |
| Type | Resource |
| Id | aws.cleanrooms.intermediate_tables |
Fields
The following fields are returned by SELECT queries:
- get_intermediate_table
- list_intermediate_tables
| Name | Datatype | Description |
|---|---|---|
id | string | The 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>) |
name | string | The name of the intermediate table. (pattern: <code>(?!\s*$)[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDBFF-\uDC00\uDFFF\t]*</code>) |
analysis_rule_types | array | The types of analysis rules associated with the intermediate table. |
arn | string | The 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_resources | array | The child resources that depend on this intermediate table. |
collaboration_arn | string | The 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_id | string | The 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_time | string (date-time) | The time the intermediate table was created. |
description | string | The description of the intermediate table. (pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDBFF-\uDC00\uDFFF\t\r\n]*</code>) |
intermediate_table_version | object | The details of the currently active version of the intermediate table. |
kms_key_arn | string | The 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_arn | string | The 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_id | string | The 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_configuration | object | Contains the configuration that defines the analysis used to populate an intermediate table. |
retention_in_days | integer | The number of days that populated data is retained before expiring. |
schema | object | The schema of the intermediate table, containing column definitions. Available after the table has been successfully populated. |
status | string | The current status of the intermediate table. (CREATED, POPULATE_STARTED, POPULATE_SUCCESS, POPULATE_FAILED, DISALLOWED_BY_DATA_PROVIDER, BASE_TABLE_REMOVED, RETENTION_PERIOD_EXPIRED) |
status_reason | string | The reason for the current status of the intermediate table. |
table_dependencies | array | The list of base tables that this intermediate table depends on. |
update_time | string (date-time) | The time the intermediate table was last updated. |
| Name | Datatype | Description |
|---|---|---|
id | string | The 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>) |
name | string | The name of the intermediate table. (pattern: <code>(?!\s*$)[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDBFF-\uDC00\uDFFF\t]*</code>) |
analysis_rule_types | array | The types of analysis rules associated with the intermediate table. |
arn | string | The 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>) |
collaboration_arn | string | The 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_id | string | The 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_time | string (date-time) | The time the intermediate table was created. |
description | string | The description of the intermediate table. (pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDBFF-\uDC00\uDFFF\t\r\n]*</code>) |
membership_arn | string | The 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_id | string | The 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>) |
retention_in_days | integer | The number of days that populated data is retained before expiring. |
status | string | The current status of the intermediate table. (CREATED, POPULATE_STARTED, POPULATE_SUCCESS, POPULATE_FAILED, DISALLOWED_BY_DATA_PROVIDER, BASE_TABLE_REMOVED, RETENTION_PERIOD_EXPIRED) |
update_time | string (date-time) | The time the intermediate table was last updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_intermediate_table | select | intermediate_table_identifier, membership_identifier, region | 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. | |
list_intermediate_tables | select | membership_identifier, region | nextToken, maxResults | Lists intermediate tables owned by the caller in a membership. We recommend using pagination to ensure that the operation returns quickly and successfully. |
create_intermediate_table | insert | membership_identifier, region, name, populationAnalysisConfiguration | 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. | |
update_intermediate_table | update | intermediate_table_identifier, membership_identifier, region | 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. | |
delete_intermediate_table | delete | membership_identifier, intermediate_table_identifier, region | Deletes an intermediate table. The delete is idempotent. Only the intermediate table owner can call this operation. | |
disallow_intermediate_table | exec | membership_identifier, region, intermediateTableName | 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. | |
populate_intermediate_table | exec | intermediate_table_identifier, membership_identifier, region | Runs 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.
| Name | Datatype | Description |
|---|---|---|
intermediate_table_identifier | string | The unique identifier of the intermediate table to populate. |
membership_identifier | string | The unique identifier of the membership that contains the intermediate table. |
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. |
SELECT examples
- get_intermediate_table
- list_intermediate_tables
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
;
Lists intermediate tables owned by the caller in a membership. We recommend using pagination to ensure that the operation returns quickly and successfully.
SELECT
id,
name,
analysis_rule_types,
arn,
collaboration_arn,
collaboration_id,
create_time,
description,
membership_arn,
membership_id,
retention_in_days,
status,
update_time
FROM aws.cleanrooms.intermediate_tables
WHERE membership_identifier = '{{ membership_identifier }}' -- required
AND region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;
INSERT examples
- create_intermediate_table
- Manifest
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
;
# Description fields are for documentation purposes
- name: intermediate_tables
props:
- name: membership_identifier
value: "{{ membership_identifier }}"
description: Required parameter for the intermediate_tables resource.
- name: region
value: "{{ region }}"
description: Required parameter for the intermediate_tables resource.
- name: name
value: "{{ name }}"
- name: description
value: "{{ description }}"
- name: populationAnalysisConfiguration
description: |
Contains the configuration that defines the analysis used to populate an intermediate table.
value:
sqlParameters:
queryString: "{{ queryString }}"
analysisTemplateArn: "{{ analysisTemplateArn }}"
- name: kmsKeyArn
value: "{{ kmsKeyArn }}"
- name: retentionInDays
value: {{ retentionInDays }}
- name: tags
value: "{{ tags }}"
description: |
Map of tags assigned to a resource
UPDATE examples
- update_intermediate_table
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
- delete_intermediate_table
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
- disallow_intermediate_table
- populate_intermediate_table
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 }}
}'
;
Runs 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.
EXEC aws.cleanrooms.intermediate_tables.populate_intermediate_table
@intermediate_table_identifier='{{ intermediate_table_identifier }}' --required,
@membership_identifier='{{ membership_identifier }}' --required,
@region='{{ region }}' --required
@@json=
'{
"parameters": "{{ parameters }}",
"computeConfiguration": "{{ computeConfiguration }}",
"analysisPayerAccountId": "{{ analysisPayerAccountId }}"
}'
;