-
Notifications
You must be signed in to change notification settings - Fork 66
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
Integrates Atlas DSL Search #17
Conversation
exciting :) let us know once it is ready to review :) |
oh CLA check seems to fail. I think you may want to configure your github username locally and do one more push. |
d81bc7d
to
8895f1a
Compare
Rebased changes with the latest config change. Cc: @gschmutz environment variables will change. Does anyone want me to add backwards compatibility? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work @whazor 👍 👍
A few comments/questions for my understanding.
30200b8
to
68fcd84
Compare
Codecov Report
@@ Coverage Diff @@
## master #17 +/- ##
==========================================
+ Coverage 67.12% 76.45% +9.32%
==========================================
Files 8 10 +2
Lines 216 344 +128
Branches 19 37 +18
==========================================
+ Hits 145 263 +118
- Misses 62 67 +5
- Partials 9 14 +5
Continue to review full report at Codecov.
|
I updated the branch in the same way as I did in metadatalibrary. Currently this pull request works together with that pull request. |
130a932
to
ccbd764
Compare
@verdan @feng-tao @jinhyukchang updated tests and config, now supports both master from Note that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few minor comments, but overall really nice work Nanne.
search_service/proxy/atlas.py
Outdated
|
||
db_name = db_attrs.get(self.NAME_ATTRIBUTE) | ||
db_qualified_name = db_attrs.get('qualifiedName', '').split('@') | ||
db_cluster = db_qualified_name[1] if len(db_qualified_name) > 1 else '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Database entity has an attribute clusterName
, which can be used directly here.
key=f"{entity.typeName or 'Table'}://{db_cluster}.{db_name}/{table_name}", | ||
description=attrs.get('description'), | ||
cluster=db_cluster, | ||
database=entity.typeName or 'Table', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There would always be a typeName. So this check would never go to or
@whazor we should bump the pypi version as well. Let me know once the pr is updated, and we could merge it. Thanks. |
* Add new proxy with the Apache Atlas as backend * Add document to describing Apache Atlas search methods
@feng-tao Resolved all issues, thank you for bumping the pypi version. Sorry all for the inconvenience of renaming the elastic env variables. |
no worry, thanks @whazor . exciting to see Amundsen works with Atlas end-to-end :) |
Merge :) Thanks @whazor |
…_metrics_dashboards to test * commit '6ffc57032ef83197b3d642ccad02b31a633c0d18': Add metrics/dashboards Fix #24, correct initialisation of elastic search (amundsen-io#27) [DPTOOLS-2252] Publish Docker image in CI (amundsen-io#26) Integrates Atlas DSL Search (amundsen-io#17) Update PULL_REQUEST_TEMPLATE.md (amundsen-io#23) Update README.md (amundsen-io#22) Add codecov based for search repo (amundsen-io#20) Update README.md (amundsen-io#19) Set the elasticsearch base (endpoint) from env variable (amundsen-io#16) Adds the PR template for amundsen search service (amundsen-io#15) Doc fix: Docker pull the official image (amundsen-io#14) Changed the name of this file for consistency (amundsen-io#13) gitignore dist/ as in metadataservice PR #28 (amundsen-io#12)
Title
Description
Similarly as in the metadata service we want to provide an integration with Apache Atlas, but then for search.
In order to have a second integration inside of the search service, we add a base proxy in order to have more than one possible search engine.
Furthermore, Apache Atlas provides multiple methods of searching and we discuss them within docs/atlas-search.md. We choose to search with the DSL as it is straightforward offered from Atlas and still provides some flexibility in search.
Tests
tests/unit/proxy/atlas.py
Which tests both normal search and with fields. The unit test mocks the atlas client and adds support for checking the query send to Atlas.
Commits
Documentation
Code Quality & Coverage
make test