CleanRoomsService / Client / get_intermediate_table_analysis_rule

get_intermediate_table_analysis_rule

CleanRoomsService.Client.get_intermediate_table_analysis_rule(**kwargs)

Retrieves the analysis rule for an intermediate table.

See also: AWS API Documentation

Request Syntax

response = client.get_intermediate_table_analysis_rule(
    membershipIdentifier='string',
    intermediateTableIdentifier='string',
    analysisRuleType='CUSTOM'
)
Parameters:
  • membershipIdentifier (string) –

    [REQUIRED]

    The unique identifier of the membership that contains the intermediate table.

  • intermediateTableIdentifier (string) –

    [REQUIRED]

    The unique identifier of the intermediate table for which to retrieve the analysis rule.

  • analysisRuleType (string) –

    [REQUIRED]

    The type of analysis rule to retrieve. Currently, only CUSTOM is supported.

Return type:

dict

Returns:

Response Syntax

{
    'analysisRule': {
        'intermediateTableIdentifier': 'string',
        'intermediateTableArn': 'string',
        'analysisRulePolicy': {
            'v1': {
                'custom': {
                    'allowedAnalyses': [
                        'string',
                    ],
                    'additionalAnalyses': 'ALLOWED'|'REQUIRED'|'NOT_ALLOWED',
                    'allowedAdditionalAnalyses': [
                        'string',
                    ],
                    'allowedAnalysisProviders': [
                        'string',
                    ],
                    'allowedResultReceivers': [
                        'string',
                    ],
                    'differentialPrivacy': {
                        'columns': [
                            {
                                'name': 'string'
                            },
                        ]
                    },
                    'disallowedOutputColumns': [
                        'string',
                    ],
                    'aggregationThresholds': [
                        {
                            'identityColumns': [
                                'string',
                            ],
                            'minimumIdentityCount': 123,
                            'type': 'COUNT_DISTINCT',
                            'outputColumnThresholds': [
                                {
                                    'outputColumnName': 'string',
                                    'minimumIdentityCount': 123
                                },
                            ],
                            'allowedAggregateExpressionType': 'COLUMNS_ONLY'|'ANY_EXPRESSION'
                        },
                    ],
                    'comparisonControls': {
                        'allowedLiteralComparisonColumns': [
                            'string',
                        ],
                        'allowedColumnComparisonColumns': [
                            'string',
                        ]
                    }
                }
            }
        },
        'analysisRuleType': 'CUSTOM',
        'createTime': datetime(2015, 1, 1),
        'updateTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) –

    • analysisRule (dict) –

      The analysis rule for the intermediate table.

      • intermediateTableIdentifier (string) –

        The unique identifier of the intermediate table associated with this analysis rule.

      • intermediateTableArn (string) –

        The Amazon Resource Name (ARN) of the intermediate table associated with this analysis rule.

      • analysisRulePolicy (dict) –

        The policy of the analysis rule.

        Note

        This is a Tagged Union structure. Only one of the following top level keys will be set: v1. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

        'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
        
        • v1 (dict) –

          The version 1 policy for the analysis rule.

          Note

          This is a Tagged Union structure. Only one of the following top level keys will be set: custom. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

          'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
          
          • custom (dict) –

            The custom analysis rule policy.

            • allowedAnalyses (list) –

              The list of allowed analyses that can be performed on the intermediate table.

              • (string) –

            • additionalAnalyses (string) –

              The setting that controls whether additional analyses are allowed on the intermediate table.

            • allowedAdditionalAnalyses (list) –

              The list of allowed additional analyses for the intermediate table.

              • (string) –

            • allowedAnalysisProviders (list) –

              The list of Amazon Web Services account IDs for the allowed analysis providers.

              • (string) –

            • allowedResultReceivers (list) –

              The list of Amazon Web Services account IDs that are allowed to receive results from queries run on the intermediate table.

              • (string) –

            • differentialPrivacy (dict) –

              Specifies the unique identifier for your users.

              • columns (list) –

                The name of the column (such as user_id) that contains the unique identifier of your users whose privacy you want to protect. If you want to turn on differential privacy for two or more tables in a collaboration, you must configure the same column as the user identifier column in both analysis rules.

                • (dict) –

                  Specifies the name of the column that contains the unique identifier of your users, whose privacy you want to protect.

                  • name (string) –

                    The name of the column, such as user_id, that contains the unique identifier of your users, whose privacy you want to protect. If you want to turn on differential privacy for two or more tables in a collaboration, you must configure the same column as the user identifier column in both analysis rules.

            • disallowedOutputColumns (list) –

              The list of columns that are not allowed in the query output.

              • (string) –

            • aggregationThresholds (list) –

              The aggregation thresholds that each query output group must satisfy. Clean Rooms filters out any group that represents fewer than the specified number of distinct identities. You can specify at most one threshold. You can’t use aggregation thresholds with differential privacy, or when allowedAnalyses allows only jobs.

              • (dict) –

                Specifies the minimum number of distinct identities that each query output group must represent.

                • identityColumns (list) –

                  The identity column, such as user_id, whose distinct values Clean Rooms counts to enforce minimum aggregation thresholds. Currently, you can specify only one column, and its data type must be string, varchar, or char.

                  • (string) –

                • minimumIdentityCount (integer) –

                  The minimum number of distinct identities that each query output group must represent. This threshold applies to all output columns in the table. To override this threshold for a specific column, use outputColumnThresholds.

                • type (string) –

                  The type of aggregation that the threshold enforces. Currently, the only supported value is COUNT_DISTINCT, which counts the distinct values in the identity column.

                • outputColumnThresholds (list) –

                  The per-column overrides of minimumIdentityCount. An output column without an override uses minimumIdentityCount.

                  • (dict) –

                    Specifies the minimum number of distinct identities for an individual output column. This value overrides the table-wide minimumIdentityCount that you set in AggregationThreshold.

                    • outputColumnName (string) –

                      The name of the output column that the override applies to. You can specify each column only once.

                    • minimumIdentityCount (integer) –

                      The minimum number of distinct identities that each query output group must represent for this column. Specify 0 to exempt the column from the threshold, or a value of 2 or greater to enforce a threshold.

                • allowedAggregateExpressionType (string) –

                  Specifies whether a query can aggregate a transformed column. This applies to the arguments of both aggregate and window functions. Valid values are:

                  COLUMNS_ONLY – A query can aggregate only a direct column reference, such as SUM(amount), or a constant. Clean Rooms rejects a query that transforms a column and then aggregates it, such as SUM(amount * 2) or SUM(ROUND(amount)).

                  ANY_EXPRESSION – A query can aggregate any expression. This includes arithmetic, such as SUM(price * quantity); a cast, such as SUM(CAST(amount AS DECIMAL)); a nested function call, such as SUM(COALESCE(amount, 0)); and a conditional, such as SUM(CASE WHEN region = 'EU' THEN amount ELSE 0 END).

            • comparisonControls (dict) –

              The controls that restrict how a query can compare the columns in the intermediate table. You can’t use comparison controls with differential privacy, or when allowedAnalyses allows only jobs.

              • allowedLiteralComparisonColumns (list) –

                The columns that a query can compare to literal values, for example, in a WHERE clause. Clean Rooms rejects a query that compares any other column to a literal value. Specify an empty list to block literal comparison on every column. You can’t specify a column that you also use as an identity column in an aggregation threshold.

                • (string) –

              • allowedColumnComparisonColumns (list) –

                The columns that a query can compare to another column, for example, in a join, a WHERE clause, a GROUP BY clause, or a window function. Clean Rooms rejects a query that uses any other column in a column-to-column comparison. Specify an empty list to block column-to-column comparison on every column.

                • (string) –

      • analysisRuleType (string) –

        The type of the analysis rule.

      • createTime (datetime) –

        The time the analysis rule was created.

      • updateTime (datetime) –

        The time the analysis rule was last updated.

Exceptions