> On Sept. 13, 2022, 4:44 p.m., Madhan Neethiraj wrote:
> > repository/src/main/java/org/apache/atlas/discovery/SearchContext.java
> > Lines 373 (patched)
> > <https://reviews.apache.org/r/74109/diff/3/?file=2269964#file2269964line373>
> >
> > It is not clear why entity-ref attributes are not allowed when
> > excludeHeaderAttributes is true. Is it for faster query response i.e., to
> > avoid look up? Given the attribute is explicitly asked for, the caller
> > should know the performance impact. Why not allow this case?
Whenever "excludeHeaderAttributes":"true", response is bit different
Example:
request: "attributes":["qualifiedName"], "excludeHeaderAttributes":"true"
response: {
"entities": [],
"attributes": {
"name": ["qualifiedName"],
"values": [
["sales@sys"],
["customer@sys"]
]
}
}
List<AtlasEntityHeader> entities, will be blank
AttributeSearchResult attributes, populate attribute values here.
Now case when
request: "attributes":["qualifiedName","db"], "excludeHeaderAttributes":"true"
We need to fit below "db" value json, to AttributeSearchResult
"db": {
"guid": "6e44a899-320c-4026-a66a-d67a76ef7c41",
"typeName": "hive_db",
"uniqueAttributes": {
"qualifiedName": "sys@cl1"
}
}
- Pinal
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74109/#review224662
-----------------------------------------------------------
On Sept. 13, 2022, 1:46 p.m., Pinal Shah wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74109/
> -----------------------------------------------------------
>
> (Updated Sept. 13, 2022, 1:46 p.m.)
>
>
> Review request for atlas, Jayendra Parab, Radhika Kundam, and Sidharth Mishra.
>
>
> Bugs: ATLAS-4671
> https://issues.apache.org/jira/browse/ATLAS-4671
>
>
> Repository: atlas
>
>
> Description
> -------
>
> **Issue** : Basic search has AtlasEntityHeader of each entity in the response.
> AtlasEntityHeader has many attributes including classification and terms.
> hence for each attribute, it will request janusgraph to get all the header
> attributes.
>
> **Approach** : To overcome, we can add a flag to exclude other attributes and
> add only selected attributes from 'attributes' field in the response
>
>
> Diffs
> -----
>
> intg/src/main/java/org/apache/atlas/AtlasErrorCode.java 608342433
>
> intg/src/main/java/org/apache/atlas/model/discovery/QuickSearchParameters.java
> 79f5aae0d
> intg/src/main/java/org/apache/atlas/model/discovery/SearchParameters.java
> 78fb4a48f
>
> repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java
> 8fbc22fa0
> repository/src/main/java/org/apache/atlas/discovery/SearchContext.java
> 01954d07e
>
> repository/src/test/java/org/apache/atlas/discovery/AtlasDiscoveryServiceTest.java
> fbc739652
>
>
> Diff: https://reviews.apache.org/r/74109/diff/3/
>
>
> Testing
> -------
>
> Unit testcases added
> Precommit :
> https://ci-builds.apache.org/job/Atlas/job/PreCommit-ATLAS-Build-Test/1215/
>
>
> Thanks,
>
> Pinal Shah
>
>