[ 
https://issues.apache.org/jira/browse/ATLAS-273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15045719#comment-15045719
 ] 

Tom Beerbower commented on ATLAS-273:
-------------------------------------

[~ayubkhan], [~shwethags],

I think that this needs some discussion.   The Atlas type system supports 
generic types which are uniquely identified by a GUID.  They can also have any 
number of attributes, including name.  For example, in our quick start the 
Table type has a super type of DataSet which defines two attributes ...

{code}
                        "attributeDefinitions": [{
                                "name": "name",
                                "dataTypeName": "string",
                                "multiplicity": "required",
                                "isComposite": false,
                                "isUnique": true,
                                "isIndexable": true,
                                "reverseAttributeName": null
                        }, {
                                "name": "description",
                                "dataTypeName": "string",
                                "multiplicity": "optional",
                                "isComposite": false,
                                "isUnique": false,
                                "isIndexable": true,
                                "reverseAttributeName": null
                        }]
{code}

So, when a Table entity is created it must have a unique name.  The problem is 
that another type could be created that does not include a 'name' attribute or 
has a 'name' attribute that is not unique or required.  If an instance of such 
a type (no name) is found for a query result, what should be returned in place 
of the name value?  ... nothing?  If so, what does the UI display in place of 
the name value?

Right now the type system is very generic.  Are we going to treat the 'name' 
attribute as special?  If so, should every type be required to include a 
unique/required 'name' attribute?



> Search query for a trait results in GUID and type. The query response can 
> also include entity name.
> ---------------------------------------------------------------------------------------------------
>
>                 Key: ATLAS-273
>                 URL: https://issues.apache.org/jira/browse/ATLAS-273
>             Project: Atlas
>          Issue Type: Bug
>    Affects Versions: 0.6-incubating
>            Reporter: Ayub Khan
>            Assignee: Tom Beerbower
>            Priority: Critical
>         Attachments: Apache-Atlas-GUID-instead-of-name.png
>
>
> Search query for a trait results in GUID and type. The query response can 
> also include entity name.
> 1. Currently an API request querying for trait results in GUID and typename. 
> For example:
> {noformat}
> curl 'http://52.27.169.250:3172/api/atlas/discovery/search?query=Dimension' 
> -H 'Accept: application/json, text/plain, */*' -H 'Connection: keep-alive' -H 
> 'Accept-Encoding: gzip, deflate, sdch' -H 'Referer: 
> http://52.27.169.250:3172/' -H 'Accept-Language: en-US,en;q=0.8' -H 
> 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) 
> AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36' 
> --compressed | python -m json.tool
> {
>     "count": 8,
>     "dataType": {
>         "attributeDefinitions": [
>             {
>                 "dataTypeName": "Dimension",
>                 "isComposite": false,
>                 "isIndexable": true,
>                 "isUnique": false,
>                 "multiplicity": {
>                     "isUnique": false,
>                     "lower": 0,
>                     "upper": 1
>                 },
>                 "name": "traitDetails",
>                 "reverseAttributeName": null
>             },
>             {
>                 "dataTypeName": "__IdType",
>                 "isComposite": false,
>                 "isIndexable": true,
>                 "isUnique": false,
>                 "multiplicity": {
>                     "isUnique": false,
>                     "lower": 0,
>                     "upper": 1
>                 },
>                 "name": "instanceInfo",
>                 "reverseAttributeName": null
>             }
>         ],
>         "typeName": "__tempQueryResultStruct5049"
>     },
>     "query": "Dimension",
>     "queryType": "dsl",
>     "requestId": "qtp1863266395-352 - f8082ab5-5fc5-4f64-8aa8-898144bebc24",
>     "results": [
>         {
>             "$typeName$": "__tempQueryResultStruct5049",
>             "instanceInfo": {
>                 "$typeName$": "__IdType",
>                 "guid": "c0276563-a802-4cc3-8ff6-fa336a7971cf",
>                 "typeName": "Table"
>             },
>             "traitDetails": null
>         },
>         {
>             "$typeName$": "__tempQueryResultStruct5049",
>             "instanceInfo": {
>                 "$typeName$": "__IdType",
>                 "guid": "40017f65-d1fe-49a4-a0a8-a3649fa19232",
>                 "typeName": "Table"
>             },
>             "traitDetails": null
>         },
>         {
>             "$typeName$": "__tempQueryResultStruct5049",
>             "instanceInfo": {
>                 "$typeName$": "__IdType",
>                 "guid": "d4ecce17-4f5b-4b95-874f-5970eda77b32",
>                 "typeName": "Table"
>             },
>             "traitDetails": null
>         },
>         {
>             "$typeName$": "__tempQueryResultStruct5049",
>             "instanceInfo": {
>                 "$typeName$": "__IdType",
>                 "guid": "0af41c8b-8574-4870-b3cb-21981c4bee57",
>                 "typeName": "View"
>             },
>             "traitDetails": null
>         },
>         {
>             "$typeName$": "__tempQueryResultStruct5049",
>             "instanceInfo": {
>                 "$typeName$": "__IdType",
>                 "guid": "d8b804c4-bda1-4a46-badd-8e7bd361836c",
>                 "typeName": "View"
>             },
>             "traitDetails": null
>         },
>         {
>             "$typeName$": "__tempQueryResultStruct5049",
>             "instanceInfo": {
>                 "$typeName$": "__IdType",
>                 "guid": "3d04e90d-9879-407c-b1ec-ccc0121cc045",
>                 "typeName": "DB"
>             },
>             "traitDetails": null
>         },
>         {
>             "$typeName$": "__tempQueryResultStruct5049",
>             "instanceInfo": {
>                 "$typeName$": "__IdType",
>                 "guid": "869107f0-5f3b-4964-8478-fa87ae2d2866",
>                 "typeName": "DB"
>             },
>             "traitDetails": null
>         },
>         {
>             "$typeName$": "__tempQueryResultStruct5049",
>             "instanceInfo": {
>                 "$typeName$": "__IdType",
>                 "guid": "97b2e1da-1c29-4799-a17e-93bc5d40d52d",
>                 "typeName": "Table"
>             },
>             "traitDetails": null
>         }
>     ]
> }
> {noformat}
> 2. With UI, the same query shows GUID and type. From an user's perspective, 
> GUID does not make sense. It should return an entity name also. Attaching 
> snapshot for reference.
> For this issue, fix is needed on both backend and UI



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to