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: Handle qualified tableau datasources more gracefully #1869

Merged
merged 1 commit into from
Jun 18, 2022

Conversation

alanmcruickshank
Copy link
Contributor

Summary of Changes

When unpacking tableau datasources, if a table reference had more than two parts (i.e. database.schema.table rather than just table or schema.table) this would raise a KeyError during unpacking and the script would stop abruptly.

This fix adds handling code for greater degrees of qualification and also a graceful path for dbapis which have potentially very long qualification options (e.g. foo.bar.baz.db.schema.table). I haven't accounted for anything more specific that something that will work for now, although that would be something that could be built on at a later date. This solution solves for the most common use case where the database may be qualified in the table reference.

Tests

No tests added as I don't believe there is an existing test which could be extended to cover this case. I'm still new to the codebase to any pointers on a sensible test to add would be excellent and I'm happy to implement one.

Documentation

No documentation added - I believe this should be the expected behaviour.

CheckList

Make sure you have checked all steps below to ensure a timely review.

  • PR title addresses the issue accurately and concisely. Example: "Updates the version of Flask to v1.0.2"
  • PR includes a summary of changes.
  • PR adds unit tests, updates existing unit tests, OR documents why no test additions or modifications are needed.

Signed-off-by: Alan <alanmcruickshank@gmail.com>
@alanmcruickshank alanmcruickshank requested a review from a team as a code owner May 19, 2022 16:53
@boring-cyborg boring-cyborg bot added the area:databuilder From databuilder folder label May 19, 2022
@alanmcruickshank alanmcruickshank changed the title fix : Handle qualified tableau datasources more gracefully fix: Handle qualified tableau datasources more gracefully May 19, 2022
@stale
Copy link

stale bot commented Jun 4, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale label Jun 4, 2022
@feng-tao feng-tao added the keep fresh Disables stalebot from closing an issue label Jun 11, 2022
@stale stale bot removed the stale label Jun 11, 2022
@feng-tao feng-tao closed this Jun 11, 2022
@feng-tao feng-tao reopened this Jun 11, 2022
@alanmcruickshank
Copy link
Contributor Author

@feng-tao - anything I need to do to help this through the review process?

@feng-tao
Copy link
Member

thanks @alanmcruickshank ! looks good and merge it now.

@feng-tao feng-tao merged commit 5727f30 into amundsen-io:main Jun 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:databuilder From databuilder folder keep fresh Disables stalebot from closing an issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants