Skip to content

Conversation

@jkaflik
Copy link
Member

@jkaflik jkaflik commented Dec 2, 2025

Support for BigQuery snapshot ClickPipe creation, currently in private preview.
Comes with a self-contained example and a short, in-line documentation example.

Extra in this PR, I normalize how sample tfvars are organized for ClickPipes examples.

This PR enables creating BigQuery ClickPipe.
This is in private preview.
@jkaflik jkaflik force-pushed the kk/clickpipes-bigquery branch from 7ae8fca to c40f64f Compare December 2, 2025 11:16
@jkaflik jkaflik requested a review from a team December 5, 2025 09:35
@jkaflik jkaflik marked this pull request as ready for review December 5, 2025 09:35
@jkaflik jkaflik requested a review from a team as a code owner December 5, 2025 09:35
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for BigQuery as a source for ClickPipe snapshots, currently in private preview. The implementation includes schema definitions, resource handling, and state synchronization for BigQuery configurations.

Key changes:

  • Adds BigQuery source models and schema definitions with support for credentials, settings, and table mappings
  • Updates source type detection and handling logic to treat BigQuery as a database pipe alongside Postgres
  • Provides a complete example with GCP infrastructure setup for BigQuery ClickPipe integration

Reviewed changes

Copilot reviewed 11 out of 31 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pkg/resource/models/clickpipe_resource.go Defines model structures for BigQuery source, settings, table mappings, and service account credentials
pkg/resource/clickpipe.go Implements BigQuery schema, extraction logic, and integrates it into the ClickPipe resource lifecycle
pkg/internal/api/clickpipe_models.go Adds API model definitions for BigQuery source configuration and credentials
pkg/internal/api/clickpipe.go Normalizes replication mode and table engine constants to be shared between Postgres and BigQuery
examples/resources/clickhouse_clickpipe/resource_bigquery_snapshot.tf Provides inline documentation example for BigQuery ClickPipe configuration
examples/clickpipe/bigquery_snapshot/vars.tf Defines input variables for the BigQuery example
examples/clickpipe/bigquery_snapshot/variables.tfvars.sample Sample variable values for the BigQuery example
examples/clickpipe/bigquery_snapshot/provider.tf.template.alpha Provider configuration template for the example
examples/clickpipe/bigquery_snapshot/provider.tf Generated provider configuration with version pinning
examples/clickpipe/bigquery_snapshot/gcp.tf GCP infrastructure setup including service account, IAM roles, and staging bucket
examples/clickpipe/bigquery_snapshot/clickpipe.tf Complete example of BigQuery ClickPipe resource configuration

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@EvandroLG
Copy link
Contributor

@jkaflik we have a short README.md for all other examples in ClickPipes: https://github.com/ClickHouse/terraform-provider-clickhouse/blob/main/examples/clickpipe/object_storage_azure_blob/README.md
Let's add one for BigQuery too?

@jkaflik
Copy link
Member Author

jkaflik commented Dec 5, 2025

@EvandroLG yes. Forgot to push.

Copy link
Member

@ilidemi ilidemi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed with others' comments, looks good otherwise.
Also Postgres has tests, does BQ need them too?

@jkaflik jkaflik merged commit c942da6 into main Dec 9, 2025
5 checks passed
@jkaflik jkaflik deleted the kk/clickpipes-bigquery branch December 9, 2025 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants