Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(batch-exports): Move bigquery credentials to channel creation (#66313)

Tomás Farías Santanaa2c74765f410
diff --git a/products/batch_exports/backend/temporal/destinations/bigquery_batch_export.py b/products/batch_exports/backend/temporal/destinations/bigquery_batch_export.py
index 04bb17c43896..5cc369bdf343 100644
--- a/products/batch_exports/backend/temporal/destinations/bigquery_batch_export.py
+++ b/products/batch_exports/backend/temporal/destinations/bigquery_batch_export.py
@@ -1169,11 +1169,11 @@ class BigQueryStorageConsumer(Consumer):
):
super().__init__(model=model)
channel = BigQueryWriteGrpcTransport.create_channel(
+ credentials=client.sync_client._credentials,
compression=grpc.Compression.Gzip,
)
transport = BigQueryWriteGrpcTransport(channel=channel)
self.write_client = bigquery_storage_v1.BigQueryWriteClient(
- credentials=client.sync_client._credentials,
transport=transport,
)
self.stream: AppendRowsStream | None = None