[ 
https://issues.apache.org/jira/browse/ATLAS-2155?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Péter Gergő Barna reassigned ATLAS-2155:
----------------------------------------

    Assignee: Péter Gergő Barna

> Attributes with null values are not filtered using search parameters
> --------------------------------------------------------------------
>
>                 Key: ATLAS-2155
>                 URL: https://issues.apache.org/jira/browse/ATLAS-2155
>             Project: Atlas
>          Issue Type: Bug
>          Components:  atlas-core
>    Affects Versions: 1.0.0
>            Reporter: Ayub Pathan
>            Assignee: Péter Gergő Barna
>
> For example: Below example shows attrbutes like "Description" has nullvalues
> {noformat}
> apathan@Ayub-sys-101:~/Hortonworks > curl 
> 'http://localhost:21000/api/atlas/v2/search/basic' -H 'Origin: 
> http://localhost:21000' -H 'Accept-Encoding: gzip, deflate, br' -H 
> 'X-XSRF-HEADER: ""' -H 'Authorization: Basic YWRtaW46YWRtaW4=' -H 
> 'Accept-Language: en-US,en;q=0.8' -H 'Cookie: 
> ATLASSESSIONID=9hm04vl07k7f1vmcmeq9q6kg9' -H 'Connection: keep-alive' -H 
> 'Pragma: no-cache' -H 'X-Requested-With: XMLHttpRequest' -H 'User-Agent: 
> Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, 
> like Gecko) Chrome/60.0.3112.113 Safari/537.36' -H 'Content-Type: 
> application/json' -H 'Accept: application/json, text/javascript, */*; q=0.01' 
> -H 'Cache-Control: no-cache' -H 'Referer: http://localhost:21000/index.html' 
> --data-binary 
> '{"excludeDeletedEntities":true,"entityFilters":{"condition":"AND","criterion":[{"attributeName":"owner","operator":"eq","attributeValue":"apathan"}]},"tagFilters":null,"attributes":["qualifiedName"],"query":null,"limit":25,"offset":0,"typeName":"hive_table","classification":null}'
>  --compressed | python -m json.tool
>   % Total    % Received % Xferd  Average Speed   Time    Time     Time  
> Current
>                                  Dload  Upload   Total   Spent    Left  Speed
> 100  1105    0   825  100   280  13953   4735 --:--:-- --:--:-- --:--:-- 14224
> {
>     "entities": [
>         {
>             "attributes": {
>                 "createTime": 1505475604641,
>                 "description": null,
>                 "name": "h5",
>                 "owner": "apathan",
>                 "qualifiedName": "default.h5@primary"
>             },
>             "classificationNames": [],
>             "displayText": "h5",
>             "guid": "7a8955bf-7395-454f-9d67-ea3ba01529bf",
>             "status": "ACTIVE",
>             "typeName": "hive_table"
>         },
>         {
>             "attributes": {
>                 "createTime": 1505475721717,
>                 "description": null,
>                 "name": "h7",
>                 "owner": "apathan",
>                 "qualifiedName": "default.h7@primary"
>             },
>             "classificationNames": [
>                 "abc",
>                 "dsfads",
>                 "sdf"
>             ],
>             "displayText": "h7",
>             "guid": "82d6de4e-d808-4c88-8207-be5a58fbbb4e",
>             "status": "ACTIVE",
>             "typeName": "hive_table"
>         }
>     ],
>     "queryType": "BASIC",
>     "searchParameters": {
>         "attributes": [
>             "qualifiedName"
>         ],
>         "entityFilters": {
>             "condition": "AND",
>             "criterion": [
>                 {
>                     "attributeName": "owner",
>                     "attributeValue": "apathan",
>                     "operator": "eq"
>                 }
>             ]
>         },
>         "excludeDeletedEntities": true,
>         "limit": 25,
>         "offset": 0,
>         "typeName": "hive_table"
>     }
> }
> {noformat}
> *Filtering those attributes using any operand will not take effect and it 
> will always result empty response*
> example:
> {noformat}
> apathan@Ayub-sys-101:~/Hortonworks > curl 
> 'http://localhost:21000/api/atlas/v2/search/basic' -H 'Origin: 
> http://localhost:21000' -H 'Accept-Encoding: gzip, deflate, br' -H 
> 'X-XSRF-HEADER: ""' -H 'Authorization: Basic YWRtaW46YWRtaW4=' -H 
> 'Accept-Language: en-US,en;q=0.8' -H 'Cookie: 
> ATLASSESSIONID=9hm04vl07k7f1vmcmeq9q6kg9' -H 'Connection: keep-alive' -H 
> 'Pragma: no-cache' -H 'X-Requested-With: XMLHttpRequest' -H 'User-Agent: 
> Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, 
> like Gecko) Chrome/60.0.3112.113 Safari/537.36' -H 'Content-Type: 
> application/json' -H 'Accept: application/json, text/javascript, */*; q=0.01' 
> -H 'Cache-Control: no-cache' -H 'Referer: http://localhost:21000/index.html' 
> --data-binary 
> '{"excludeDeletedEntities":true,"entityFilters":{"condition":"AND","criterion":[{"attributeName":"description","operator":"neq","attributeValue":"ac"}]},"tagFilters":null,"attributes":["qualifiedName"],"query":null,"limit":25,"offset":0,"typeName":"hive_table","classification":null}'
>  --compressed | python -m json.tool
>   % Total    % Received % Xferd  Average Speed   Time    Time     Time  
> Current
>                                  Dload  Upload   Total   Spent    Left  Speed
> 100   552    0   270  100   282   4562   4765 --:--:-- --:--:-- --:--:--  4862
> {
>     "queryType": "BASIC",
>     "searchParameters": {
>         "attributes": [
>             "qualifiedName"
>         ],
>         "entityFilters": {
>             "condition": "AND",
>             "criterion": [
>                 {
>                     "attributeName": "description",
>                     "attributeValue": "ac",
>                     "operator": "neq"
>                 }
>             ]
>         },
>         "excludeDeletedEntities": true,
>         "limit": 25,
>         "offset": 0,
>         "typeName": "hive_table"
>     }
> }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to