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

Allow sqlalchemy URIs longer than 1024 #21590

Open
3 tasks done
epa095 opened this issue Sep 26, 2022 · 2 comments
Open
3 tasks done

Allow sqlalchemy URIs longer than 1024 #21590

epa095 opened this issue Sep 26, 2022 · 2 comments
Labels
#bug Bug report

Comments

@epa095
Copy link

epa095 commented Sep 26, 2022

How to reproduce the bug

Try to add a a sqlalchemy URI with more than 1024 characters, and one gets an error:
{"message":{"sqlalchemy_uri":["Length must be between 1 and 1024."]}}

Why would anyone need more than 1024 characters in the URI?

I want to use databricks SQL. It accepts both PAT and Azure AD tokens. The Azure AD tokens are actually JWT tokens, and are roughly 1200 characters long. And the way to provide the token is to put it as part of the URI.

Environment

  • superset version: 2.0
  • python version: 3.8

Checklist

Make sure to follow these steps before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if there are 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.

Additional context

Add any other context about the problem here.

@epa095 epa095 added the #bug Bug report label Sep 26, 2022
@chanyou0311
Copy link
Contributor

I had same problem.
I got around it by defining the DB_CONNECTION_MUTATOR function to override password in url.

@rusackas
Copy link
Member

rusackas commented Mar 8, 2024

I was about to close this as stale, but it sounds like a loose thread. Do we (a) need a docs entry about the DB_CONNECTION_MUTATOR approach, (b) need a more systemic way to handle this (e.g. URI length limit increase), or (c) not worry about it and close this as stale?

CC @betodealmeida @dpgaspar for input if warranted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#bug Bug report
Projects
None yet
Development

No branches or pull requests

3 participants