Skip to content

Issue #3 - [BUG] BigQuery ProjectId missing in generated querie #6

@zenocross

Description

@zenocross

Description

When generating SQL queries in the Explore view for BigQuery datasets, the project ID (catalog name) is not included in the query, causing queries to fail or use incorrect default projects.

Current Behavior

  • Queries generated as: schema.table
  • Missing catalog/project identifier
  • BigQuery cannot resolve table reference
  • Queries fail or use wrong project

Expected Behavior

  • Queries should include full path: project.schema.table
  • Use dataset's catalog name if available
  • Only applies to databases supporting catalog.schema.table structure
  • Queries execute successfully in BigQuery

Steps to Reproduce

  1. Connect to a BigQuery database
  2. Create a dataset with a specific project ID
  3. Navigate to Explore view
  4. Observe the generated SQL query
  5. Notice missing project ID in table reference
  6. Query fails or uses wrong default project

Proposed Solution

When generating SQL in Explore:

  • Check if dataset has a catalog name
  • Verify database engine supports catalog.schema.table structure (check supports_cross_catalog_queries=True)
  • Include catalog name in generated query if both conditions met

Technical Context

  • Components: SQL generation, Explore view
  • Backend logic for query building
  • Database engine spec configuration
  • Requires understanding of BigQuery identifier structure

Download https://cap.so/ to record your screen (use Studio mode). Export as an mp4, and drag and drop into an issue comment below.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions