Skip to content

Conversation

betodealmeida
Copy link
Member

@betodealmeida betodealmeida commented Jul 28, 2025

SUMMARY

When generating SQL in Explore, use the dataset catalog name in the query if it has one and the dialect supports the catalog.schema.table identifier structure (DB engine spec has supports_cross_catalog_queries=True).

Fixes #33465.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Screenshot 2025-07-28 at 3 02 37 PM

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

Copy link

korbit-ai bot commented Jul 28, 2025

Based on your review schedule, I'll hold off on reviewing this PR until it's marked as ready for review. If you'd like me to take a look now, comment /korbit-review.

Your admin can change your review schedule in the Korbit Console

@betodealmeida betodealmeida force-pushed the catalog-on-generated-query branch 2 times, most recently from 8fd6f23 to 9e0531b Compare July 28, 2025 19:01
@betodealmeida betodealmeida force-pushed the catalog-on-generated-query branch from 9e0531b to 50babc1 Compare July 28, 2025 19:11
@pull-request-size pull-request-size bot added size/L and removed size/M labels Jul 28, 2025
@betodealmeida betodealmeida marked this pull request as ready for review July 28, 2025 19:12
@dosubot dosubot bot added the explore Namespace | Anything related to Explore label Jul 28, 2025
Copy link

@korbit-ai korbit-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review by Korbit AI

Korbit automatically attempts to detect when you fix issues in new commits.
Category Issue Status
Documentation Cross-catalog Query Support Rationale Missing ▹ view 🧠 Incorrect
Files scanned
File Path Reviewed
docker/pythonpath_dev/superset_config_docker_light.py
superset/connectors/sqla/models.py

Explore our documentation to understand the languages and file types we support and the files we ignore.

Check out our docs on how you can make Korbit work best for you and your team.

Loving Korbit!? Share us on LinkedIn Reddit and X

Comment on lines 1370 to +1373
def get_sqla_table(self) -> TableClause:
tbl = table(self.table_name)
# For databases that support cross-catalog queries (like BigQuery),
# include the catalog in the table identifier to generate
# project.dataset.table format

This comment was marked as resolved.

Copy link
Member

@mistercrunch mistercrunch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - btw related PR -> #34296 needs review!

@betodealmeida betodealmeida force-pushed the catalog-on-generated-query branch from 6646b24 to dda17ec Compare July 29, 2025 15:17
@betodealmeida betodealmeida force-pushed the catalog-on-generated-query branch from dda17ec to 16ddb4f Compare July 29, 2025 15:18
@betodealmeida betodealmeida merged commit 32626ab into master Jul 29, 2025
48 checks passed
@betodealmeida betodealmeida deleted the catalog-on-generated-query branch July 29, 2025 16:30
@sadpandajoe sadpandajoe added the review:checkpoint Last PR reviewed during the daily review standup label Jul 30, 2025
@rusackas rusackas removed the review:checkpoint Last PR reviewed during the daily review standup label Jul 31, 2025
LisaHusband pushed a commit to LisaHusband/superset that referenced this pull request Aug 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
explore Namespace | Anything related to Explore preset-io size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BigQuery ProjectId is missing on query
5 participants