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

ODPS data source table preview failed #32301

Open
3 tasks done
zhutong6688 opened this issue Feb 18, 2025 · 4 comments · May be fixed by #32310
Open
3 tasks done

ODPS data source table preview failed #32301

zhutong6688 opened this issue Feb 18, 2025 · 4 comments · May be fixed by #32310
Assignees
Labels
sqllab Namespace | Anything related to the SQL Lab

Comments

@zhutong6688
Copy link

Bug description

The bug is that when using the odps data source, an error occurs in the sqllab module when previewing the odps partition table, indicating that the odps partition table data cannot be previewed。The following is a detailed reproduction process:
1、Open settings and configure the odps data source
2、In the top column, find the "SQL" column, create a new SQLLab, and in the left column, select "odps partition table"
3、Next, the data preview of the odps table will be executed, and then an error will be reported: the odps table cannot preview the entire partition, only the specified partition can be used

Screenshots/recordings

Image
The above image is the error reported when previewing data in the odps partition table

Superset version

master / latest-dev

Python version

3.9

Node version

16

Browser

Chrome

Additional context

No response

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
@dosubot dosubot bot added the sqllab Namespace | Anything related to the SQL Lab label Feb 18, 2025
Copy link

dosubot bot commented Feb 18, 2025

Hey @zhutong6688, I'm here to help you with any bugs, questions, or contributions. Let's tackle this issue together!

The issue you're encountering seems to be related to the way Apache Superset handles partitioned tables in ODPS data sources. When previewing partitioned tables, Superset expects a specific partition to be specified to avoid full table scans, which can lead to errors like the one you're experiencing.

To resolve this issue, you should specify a partition when querying the ODPS partitioned table in SQLLab. This can be done by adding a partition predicate to your SQL query. For example, if your table student2 has a partition column month, you should include a condition like WHERE month = '2025-02' in your query to specify the partition you want to preview.

Unfortunately, I couldn't find specific error handling mechanisms or configuration settings in the Superset codebase that directly address this issue with ODPS data sources. However, ensuring that your queries include partition predicates should help avoid the semantic analysis exception you're encountering.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@zhutong6688 zhutong6688 linked a pull request Feb 19, 2025 that will close this issue
9 tasks
@zhutong6688
Copy link
Author

Please assign me the task of fixing the current issue. I have already committed the code and submitted the PR

@hainenber
Copy link
Contributor

Assigned :D

@zhutong6688
Copy link
Author

@hainenber Thank you very much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sqllab Namespace | Anything related to the SQL Lab
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants