Skip to content

[ZEPPELIN-6408] Modernize BigQuery Interpreter with google-cloud-bigquery client#5191

Open
jongyoul wants to merge 4 commits intoapache:masterfrom
jongyoul:ZEPPELIN-6408-bigquery-modernization
Open

[ZEPPELIN-6408] Modernize BigQuery Interpreter with google-cloud-bigquery client#5191
jongyoul wants to merge 4 commits intoapache:masterfrom
jongyoul:ZEPPELIN-6408-bigquery-modernization

Conversation

@jongyoul
Copy link
Member

@jongyoul jongyoul commented Mar 22, 2026

What is this PR for?

The current BigQuery interpreter uses the legacy google-api-services-bigquery library, which is outdated and lacks modern features like the Storage Read API. This PR updates the interpreter to use the modern google-cloud-bigquery Cloud Client Library.

Key improvements:

  • Updated core dependencies to google-cloud-bigquery (v2.38.0).
  • Simplified query execution and result iteration using modern APIs.
  • Enhanced authentication flow:
    • Supports Application Default Credentials (ADC).
    • Added a fallback mechanism to prompt for Service Account JSON via Zeppelin's GUI if ADC is unavailable.
  • Improved error handling and job management (cancellation support).

What type of PR is it?

Improvement, Refactoring

Todos

  • - Update bigquery/pom.xml with modern Google Cloud dependencies.
  • - Refactor BigQueryInterpreter.java to use the new client library.
  • - Implement fallback authentication via z.input GUI.
  • - Update and verify BigQueryInterpreterTest against a live GCP environment.

What is the Jira issue?

How should this be tested?

  • Automated Tests: Updated BigQueryInterpreterTest to use the new client. Verified against a live GCP project using public datasets.
  • Manual Verification:
    1. Configure a BigQuery interpreter in Zeppelin.
    2. Run a query. It should automatically use ADC from the environment.
    3. If ADC is missing, it should display an input box asking for a Service Account JSON. Paste a valid JSON key and run again to verify successful authentication.

Screenshots (if appropriate)

(Not applicable for this library update, but functional verification confirmed via logs)

Questions:

  • Does the license files need to update? No.
  • Is there breaking changes for older versions? No, existing properties are maintained.
  • Does this needs documentation? No major documentation changes required, but GUI fallback is a new UX feature.

Copilot AI review requested due to automatic review settings March 22, 2026 05:03
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

Updates Zeppelin’s BigQuery interpreter to use the modern google-cloud-bigquery Java client library, replacing the legacy BigQuery API client and documenting the new authentication behavior.

Changes:

  • Refactors BigQueryInterpreter to execute queries and iterate results using google-cloud-bigquery.
  • Adds an authentication fallback flow that prompts for a Service Account JSON key when ADC isn’t available.
  • Updates BigQuery interpreter docs/README and adjusts the integration test context setup.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 14 comments.

Show a summary per file
File Description
bigquery/src/main/java/org/apache/zeppelin/bigquery/BigQueryInterpreter.java Migrates execution/auth/cancel logic to google-cloud-bigquery and adds GUI-based SA JSON fallback.
bigquery/pom.xml Replaces legacy Google API deps with google-cloud-bigquery and updates Guava dependency.
bigquery/src/test/java/org/apache/zeppelin/bigquery/BigQueryInterpreterTest.java Updates resource loading and sets AuthenticationInfo on the context.
docs/interpreter/bigquery.md Updates user-facing docs for new client + authentication modes and refreshes examples.
bigquery/README.md Updates module README with new auth/config/test instructions.

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

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.

2 participants