Skip to content
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

Fix: ODPS data source table preview failed(#32301)-New #32556

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

zhutong6688
Copy link

SUMMARY

I fixed an error when using sqllab to preview data after configuring the odps data source in superset, and added partition restrictions for previewing SQL
Unlike before, this is a separate collection of the logic of ODPS into a single class(before #32310

fixes: #32301

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

This is a preview of the odps table data before the repair:
image

This is a preview of the repaired ODPS table data:
5f49bcaba6d6cd31bdfdfae4ada6970
d2de24aca26b1c8560deaabbf3d1144
8aeca80279b56aaf4b3ee4ffeec96d5
In addition, when using other data sources, there is no problem with testing and it does not affect other data sources

TESTING INSTRUCTIONS

  1. First, configure the ODPS data source
  2. Create a new SQLlab page in the "SQL" column, select the database Schema
  3. Select partitioned tables, non partitioned tables, and multi partitioned tables in sequence to test the correctness of data preview
  4. Choose another data source, such as an example data source like SQLite, and follow the same steps as above to verify the validity of the data preview

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

@github-actions github-actions bot added the api Related to the REST API label Mar 10, 2025
@dosubot dosubot bot added data:connect Namespace | Anything related to db connections / integrations sqllab Namespace | Anything related to the SQL Lab labels Mar 10, 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 Fix Detected
Design Database-specific logic in generic DAO ▹ view
Design Tight coupling with concrete engine implementation ▹ view
Performance Redundant Column Metadata Fetch ▹ view
Security SQL Injection Risk in Partition Query Construction ▹ view
Functionality Ineffective Partition Filtering ▹ view
Logging Unnecessary Debug Print Statement ▹ view
Readability Undocumented Complex Regex Pattern ▹ view
Functionality Overly Strict ODPS URI Pattern Matching ▹ view
Files scanned
File Path Reviewed
superset/daos/database.py
superset/db_engine_specs/odps.py
superset/sql/parse.py
superset/databases/api.py

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

Need a new review? Comment /korbit-review on this PR and I'll review your latest changes.

Korbit Guide: Usage and Customization

Interacting with Korbit

  • You can manually ask Korbit to review your PR using the /korbit-review command in a comment at the root of your PR.
  • You can ask Korbit to generate a new PR description using the /korbit-generate-pr-description command in any comment on your PR.
  • Too many Korbit comments? I can resolve all my comment threads if you use the /korbit-resolve command in any comment on your PR.
  • On any given comment that Korbit raises on your pull request, you can have a discussion with Korbit by replying to the comment.
  • Help train Korbit to improve your reviews by giving a 👍 or 👎 on the comments Korbit posts.

Customizing Korbit

  • Check out our docs on how you can make Korbit work best for you and your team.
  • Customize Korbit for your organization through the Korbit Console.

Feedback and Support

A print was omitted and deleted during development, and this time it is to delete the print
@zhutong6688
Copy link
Author

Just assign this task to me, thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Related to the REST API data:connect Namespace | Anything related to db connections / integrations size/L sqllab Namespace | Anything related to the SQL Lab
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ODPS data source table preview failed
1 participant