Skip to content

[explore] fetching of column values for filters not working with superset views #2810

@rumbin

Description

@rumbin

Make sure these boxes are checked before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if any
  • I have reproduced the issue with at least the latest released version of superset
  • I have checked the issue tracker for the same issue and I haven't found one similar

Superset version

0.18.2

Expected results

Tables defined via SQL statement (superset view), e.g. via the visualize workflow from SQLLab, should behave like regular tables or views with respect to the filter select functionality in explore view.
I.e., fetching on distinct column values should succeed.

Actual results

Fetching of distinct column values fails because the SQL query is not run agains the superset view as a subquery, but against the table name. In general, this table is of course not known by the SQL server.

sqlalchemy.exc.ProgrammingError: (psycopg2.ProgrammingError) relation "test_superset_view" does not exist

Steps to reproduce

  • Create a superset view, e.g. via the visualize workflow from SQLLab and enable Filter Select for this table.
  • Explore the table and try to add a filter on any filterable column.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions