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(api): loading viz_type from request params #31929

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

Conversation

hdahme
Copy link

@hdahme hdahme commented Jan 20, 2025

SUMMARY

Previously, when passing viz_type via the API, it would default to table. This change allows us to send viz_type and have the charts respect it in the UI

TESTING INSTRUCTIONS

Make an API request via python and send the following params

params = {
        "viz_type": "big_number",
        "groupby": columns,
        "metrics": metrics,
        "adhoc_filters": [
            {
                "expressionType": "SQL",
                "sqlExpression": where_clause,
                "clause": "WHERE",
            }
        ]
    }

The resulting chart would always be a table. No longer

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

@dosubot dosubot bot added api Related to the REST API viz:charts Namespace | Anything related to viz types labels Jan 20, 2025
@hdahme hdahme force-pushed the fix-viz-type-in-api-calls branch from f2d6ea8 to a8b5a39 Compare January 20, 2025 05:43
@github-actions github-actions bot removed the api Related to the REST API label Jan 20, 2025
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Congrats on making your first PR and thank you for contributing to Superset! 🎉 ❤️

We hope to see you in our Slack community too! Not signed up? Use our Slack App to self-register.

@hdahme hdahme force-pushed the fix-viz-type-in-api-calls branch from a8b5a39 to 23f09f5 Compare January 20, 2025 05:47
Copy link

korbit-ai bot commented Jan 20, 2025

I was unable to post the issues I found. This could be because a force push or squash has changed the commit history since I scanned this pull request. You can get another review by commenting /korbit-review.

@hdahme hdahme force-pushed the fix-viz-type-in-api-calls branch 2 times, most recently from 8ff4471 to c9190ed Compare January 20, 2025 05:49
@hdahme hdahme force-pushed the fix-viz-type-in-api-calls branch from c9190ed to aa211c4 Compare January 20, 2025 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/S viz:charts Namespace | Anything related to viz types
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant