← All stories
● Covered by 1 source · 1 reportMedium impact1 neutral

BigQuery Python UDFs Now Support Standard Logging to Cloud Logging

🔄 Updated 18d ago
New to BrevFeed? We gather this story from every outlet covering it into one summary — ranked by real-world impact, not just the latest headline — so you never miss what matters. What is BrevFeed? →

Key points

  • Python UDFs in BigQuery now support standard logging.
  • Structured logs are emitted directly to Cloud Logging.
  • Enables row-level diagnostics for fault-tolerant pipelines.
  • Supports real-time alerts and SQL-based issue triage.

New Logging Feature in BigQuery Python UDFs

BigQuery has introduced a new logging feature for Python User-Defined Functions (UDFs). This update allows developers to use Python's standard logging library directly within BigQuery UDFs. Structured logs can now be seamlessly emitted into Cloud Logging, removing the need for external plugins or custom connectors.

Enabling Pipeline Observability

This new capability supports various operational monitoring and debugging workflows. One key application is building fault-tolerant and resilient data pipelines. The feature enables the capture of row-level diagnostic telemetry during query execution, which helps teams isolate problematic records, trigger real-time alerts, and triage issues using SQL without stopping entire workloads.

Example Workflow: E-commerce Event Ingestion

An example demonstrates an e-commerce event ingestion pipeline with three stages. First, an inline validation Python UDF parses incoming JSON payloads; valid records proceed, while corrupted rows trigger logging.error() and return NULL. Second, Cloud Monitoring uses log-based metrics to notify teams if error rates exceed thresholds. Third, data engineers can query quarantined payloads in BigQuery using standard SQL over the _AllLogs view to diagnose root causes and re-ingest recovered data.

Implementation Details

To use the feature, developers create a generic Python UDF that parses JSON and checks for required fields, logging diagnostic JSON and returning NULL on failure. Logging is enabled in the session using SET @@udf.properties. This allows queries to succeed without interruption, routing bad rows to Cloud Logging for later analysis and alerting.

✨ This summary was generated by AI from the outlets' reporting listed below. It is not independently verified and may contain errors — check the original sources. How BrevFeed works →

The daily brief

One email each morning: the day's tech stories, clustered across outlets and summarized. No account needed.

One email a day. Unsubscribe in one click, any time.

Today's brief

Spend a few minutes, get the whole day. Every topic's top stories in one hands-free rundown — listen, watch, or read the transcript.

~4 min · 3 stories · Nov 07

▶ Play today's brief Listen on Spotify

New every morning, and the back catalogue is archived by date.

Reporting from

BigQuery Python User-Defined Functions (UDFs) now integrate directly with Python's standard logging library, allowing structured logs to be emitted into Cloud Logging without external tools. This feature enables developers to build more fault-tolerant data pipelines by capturing row-level diagnostics, facilitating real-time alerting and issue triage via SQL.