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(ingest/sqlalchemy): Fix URL parsing when sqlalchemy_uri provided #9032

Merged
merged 4 commits into from
Oct 18, 2023

Conversation

asikowitz
Copy link
Collaborator

Previously we would not alter sqlalchemy_uri even when trying to access a different database, resulting in errors. Since we provide this option we should support.

I replace our custom make_sqlalchemy_uri with one provided by the sqlalchemy sdk. I have to parse host and port out of at but still think this is preferred. This method can handle multiple values for the same key, for example.

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

@github-actions github-actions bot added the ingestion PR or Issue related to the ingestion of metadata label Oct 17, 2023
f"{key}={quote_plus(value)}" for (key, value) in uri_opts.items() if value
host, port = at.rsplit(":", 1)
return str(
URL.create(
Copy link
Contributor

Choose a reason for hiding this comment

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

nice

@treff7es treff7es merged commit d2eb423 into datahub-project:master Oct 18, 2023
52 of 54 checks passed
@asikowitz asikowitz deleted the fix-url-parsing branch October 19, 2023 22:23
@maggiehays maggiehays added the hacktoberfest-accepted Acceptance for hacktoberfest https://hacktoberfest.com/participation/ label Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest-accepted Acceptance for hacktoberfest https://hacktoberfest.com/participation/ ingestion PR or Issue related to the ingestion of metadata
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants