atlas-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keval Bhatt (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (ATLAS-1521) Update UI to eliminate REST calls to obtain schema data
Date Fri, 03 Feb 2017 13:51:51 GMT

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

Keval Bhatt updated ATLAS-1521:
-------------------------------
    Attachment: ATLAS-1521.patch

> Update UI to eliminate REST calls to obtain schema data
> -------------------------------------------------------
>
>                 Key: ATLAS-1521
>                 URL: https://issues.apache.org/jira/browse/ATLAS-1521
>             Project: Atlas
>          Issue Type: Improvement
>          Components: atlas-webui
>    Affects Versions: 0.8-incubating
>            Reporter: Madhan Neethiraj
>            Assignee: Keval Bhatt
>         Attachments: ATLAS-1521.patch
>
>
> When rendering entity details page, UI makes a REST API call to /schema/{guid} to obtain
the schema data. For entity types that don't support the notion of schema, this REST API call
returns an error. When such error is returned, UI does not add 'Schema' tab to the details
page. When the call returns data, UI renders the data in 'Schema' tab.
> Given that only few entity-types (like hive_table) support schema, most calls to retrieve
schema return an error. Having additional schema related information in the type can eliminate
the need for unnecessary REST calls. ATLAS-1517 introduces additional data in 'typeDefOptions'
attribute of entity-type definition. UI can use the following logic to render the schema tab
contents:
> # Does an entity-type support schema?
>   Is {{entityDef.typeDefOptions\[schemaElementsAttribute]}} set and its value non empty?
If yes, schema is supported else not-supported. For hive_table type, this will be set to 'columns'
- as shown below:
> {code}
>       "typeDefOptions": {
>         "schemaElementsAttribute": "columns"
>       }
> {code}
> # How does UI get the data to display in schema tab?
>   Value of {{entityDef.typeDefOptions\[schemaElementsAttribute]}} will be the name of
the attribute in the entity being rendered. This attribute should be of type array. The value
of this attribute will have the data needed to render the schema tab
> # What are the columns to display in schema tab?
>   Each element of the array attribute value will hold an entity/struct instance.For example,
In case of hive_table, columns attribute will have an array of hive_column objects. From each
such element, UI should get value of attributes listed in {{elementDef.typeDefOptions\[schemaAttributes]}}
to render the schema table. For example, hive_column will have the following:
> {code}
>       "typeDefOptions": {
>         "schemaAttributes": "[\"name\", \"description\", \"owner\", \"type\", \"comment\",
\"position\"]"
>       }
> {code}
> The value will be a json-ified string array.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message