-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(bigquery): support to query BigQuery external table #1055
feat(bigquery): support to query BigQuery external table #1055
Conversation
WalkthroughThe changes update two modules to include two additional OAuth scopes for BigQuery credentials. In both the Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Connector as BigQueryConnector
participant Cred as Credentials
participant GCS as Google Cloud Services
Client->>Connector: query(service_account_info)
Connector->>Cred: Create credentials from service account info
Cred->>Cred: with_scopes(["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/cloud-platform"])
Connector->>GCS: Execute query with updated credentials
sequenceDiagram
participant Client
participant DataSource as DataSourceExtension
participant Cred as Credentials
participant GCS as Google Cloud Services
Client->>DataSource: get_bigquery_connection(info)
DataSource->>Cred: Create credentials for BigQuery
Cred->>Cred: with_scopes(["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/cloud-platform"])
DataSource->>GCS: Return connection using updated credentials
Poem
Tip 🌐 Web search-backed reviews and chat
✨ Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
ibis-server/app/model/data_source.py (1)
101-106
: LGTM! Consider adding a comment explaining scope requirements.The scope configuration is correctly placed before creating the connection. Consider adding a comment explaining why these scopes are required for external table support.
+ # Add required scopes for accessing BigQuery external tables credentials = credentials.with_scopes([ "https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/cloud-platform", ])
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
ibis-server/app/model/connector.py
(1 hunks)ibis-server/app/model/data_source.py
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: validate-pull-request-title
- GitHub Check: ci
🔇 Additional comments (1)
ibis-server/app/model/connector.py (1)
154-155
: Verify the minimum required scopes for external tables.Let's verify if both scopes are necessary for external table support.
Description
Refer to Create credentials with scopes. If a BigQuery table comes from an external data (e.g. google sheet), we need to set up require permission and scopes for the credentials.
Summary by CodeRabbit