Bug description

Most, if not all database access engage engine_spec.adjust_engine_params(). This allow the rewrite of the database connection adding schema to the URL.

In the case of Filter Value Dropdown, the mechanism doesn't go through adjust_connection_params() leaving the access URL schema-less.

When we trap the request, we don't know to which schema the dataset belongs.

Screenshots/recordings

No response

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.

Comment From: dosubot[bot]

Hey @coolimo! I'm here to help you with any bugs, questions, or contributions you have for Superset. I'm a bot designed to assist you while you wait for a human maintainer. Let's tackle this issue together!

The issue you're encountering seems to be related to the Filter Value Dropdown feature not utilizing the adjust_connection_params() function, which results in the database connection URL lacking the schema information. This is different from most database accesses that use engine_spec.adjust_engine_params() to include the schema in the URL, ensuring that queries are executed in the correct context.

To address this, you might need to ensure that the Filter Value Dropdown feature is modified to incorporate schema information in the connection URL, possibly by integrating a similar mechanism to adjust_engine_params() or by ensuring adjust_connection_params() is correctly implemented and utilized for this feature. This would help in identifying the correct schema for the dataset when requests are made.

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

Comment From: mistercrunch

Took a quick look at this -> https://github.com/apache/superset/blob/master/superset/db_engine_specs/base.py#L1391-L1423, but thinking tagging @betodealmeida and @villebro who have most context here is best way to go

Comment From: rusackas

Pinging @betodealmeida / @villebro again for good measure :)