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: add connection testing params for snowflake #9272

Merged
merged 2 commits into from
Mar 11, 2020
Merged

fix: add connection testing params for snowflake #9272

merged 2 commits into from
Mar 11, 2020

Conversation

villebro
Copy link
Member

@villebro villebro commented Mar 10, 2020

CATEGORY

Choose one

  • Bug Fix
  • Enhancement (new features, refinement)
  • Refactor
  • Add tests
  • Build / Development Environment
  • Documentation

SUMMARY

When connecting to a Snowflake database, the "Test Connection" button reports "Seems OK!", even if the user does not have proper rights to access the relevant database, schema, role or warehouse. This is problematic, because the connector introduces irregular behavior if proper authorization is missing, for instance returning duplicated schema names during calls to inspector.get_schema_names(). This PR introduces a method BaseEngineSpec.mutate_db_for_connection_test which can be overridden by a db spec to introduce connection validation, and implements the mostly undocumented validate_default_parameters flag (disabled by default, probably due to performance reasons) for Snowflake that validates the connection params when pressing "Test Connection".

BEFORE

image

AFTER

image
image

TEST PLAN

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

REVIEWERS

Copy link
Member

@willbarrett willbarrett left a comment

Choose a reason for hiding this comment

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

👍

@villebro villebro merged commit 3682702 into apache:master Mar 11, 2020
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.36.0 labels Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/M 🚢 0.36.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants