Skip to content

Improvement - Hue Atlas search for classification and tags #4070

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

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions desktop/libs/metadata/src/metadata/catalog/atlas_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,13 +285,17 @@ def search_entities_interactive(self, query_s=None, limit=100, offset=0, facetFi
'criterion': [{
'condition': 'OR',
'criterion': [{
'attributeName': 'name',
'attributeValue': query_s,
'operator': 'contains'
'attributeName': '__typeName',
'operator': 'eq',
Copy link
Collaborator

Choose a reason for hiding this comment

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

you are also switch the operator from contains to eq. Won't this have a significant change in the expected behavior?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@amitsrivastava , The information was provided by Atlas team, I had no idea that there was an operator with eq there. Their recommendation was that Hue issuing contains with query_s causes performances issue and times out when there are too many things to look for and using __typename with eq and the attributevalue helps with getting the data out fast and also does not cause Atlas to perform massive query search operation.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we please add this info as a comment in the code?

Copy link
Contributor

Choose a reason for hiding this comment

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

I assume eq means exact match? IIRC this search also gets triggered from the top search where we'll need a "contains" search for usability.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm trying to say that we might need both, exact match when fetching details for a known sql entity and contains for user initiated search..

Copy link
Collaborator

Choose a reason for hiding this comment

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

+1 for @JohanAhlen's statement and approach

'attributeValue': 'hive_column'
}, {
'attributeName': 'description',
'attributeValue': query_s,
'operator': 'contains'
'attributeName': '__typeName',
'operator': 'eq',
'attributeValue': 'hive_table'
}, {
'attributeName': '__typeName',
'operator': 'eq',
'attributeValue': 'hive_db'
}]
}]
},
Expand Down