Skip to content

feat(bigquery): support for WITH AGGREGATION_THRESHOLD in aggregations #8903

Open
@tswast

Description

@tswast

Is your feature request related to a problem?

BigQuery customers can set aggregation threshold analysis rules to protect privacy-sensitive data. If they have setup such rules then they need to use a WITH AGGREGATION_THRESHOLD clause when querying the table.

SELECT WITH AGGREGATION_THRESHOLD
  test_id, COUNT(DISTINCT last_name) AS student_count
FROM mydataset.ExamView
GROUP BY test_id;

from https://cloud.google.com/bigquery/docs/analysis-rules#view_in_privacy_query

Describe the solution you'd like

A new parameter to Table.aggregate and/or Table.groupby would seem to be the right place to add this.

Alternatively, maybe a new pre-groupby table expression type for a thresholded table.

What version of ibis are you running?

N/A

What backend(s) are you using, if any?

BigQuery

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bigqueryThe BigQuery backendfeatureFeatures or general enhancements

    Type

    No type

    Projects

    Status

    backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions