Interface AggregationThreshold.Builder

  • Method Details

    • identityColumns

      AggregationThreshold.Builder identityColumns(Collection<String> identityColumns)

      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.

      Parameters:
      identityColumns - 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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • identityColumns

      AggregationThreshold.Builder identityColumns(String... identityColumns)

      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.

      Parameters:
      identityColumns - 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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • minimumIdentityCount

      AggregationThreshold.Builder minimumIdentityCount(Integer minimumIdentityCount)

      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.

      Parameters:
      minimumIdentityCount - 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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • type

      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.

      Parameters:
      type - 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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • type

      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.

      Parameters:
      type - 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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • outputColumnThresholds

      AggregationThreshold.Builder outputColumnThresholds(Collection<OutputColumnThreshold> outputColumnThresholds)

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

      Parameters:
      outputColumnThresholds - The per-column overrides of minimumIdentityCount. An output column without an override uses minimumIdentityCount.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • outputColumnThresholds

      AggregationThreshold.Builder outputColumnThresholds(OutputColumnThreshold... outputColumnThresholds)

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

      Parameters:
      outputColumnThresholds - The per-column overrides of minimumIdentityCount. An output column without an override uses minimumIdentityCount.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • outputColumnThresholds

      AggregationThreshold.Builder outputColumnThresholds(Consumer<OutputColumnThreshold.Builder>... outputColumnThresholds)

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

      This is a convenience method that creates an instance of the OutputColumnThreshold.Builder avoiding the need to create one manually via OutputColumnThreshold.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to outputColumnThresholds(List<OutputColumnThreshold>).

      Parameters:
      outputColumnThresholds - a consumer that will call methods on OutputColumnThreshold.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • allowedAggregateExpressionType

      AggregationThreshold.Builder allowedAggregateExpressionType(String allowedAggregateExpressionType)

      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).

      Parameters:
      allowedAggregateExpressionType - 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).

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • allowedAggregateExpressionType

      AggregationThreshold.Builder allowedAggregateExpressionType(AllowedAggregateExpressionType allowedAggregateExpressionType)

      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).

      Parameters:
      allowedAggregateExpressionType - 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).

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also: