You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by "Madhan Neethiraj (JIRA)" <ji...@apache.org> on 2016/10/16 11:14:20 UTC
[jira] [Updated] (ATLAS-1227) Add support for attribute constraints
in the API
[ https://issues.apache.org/jira/browse/ATLAS-1227?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Madhan Neethiraj updated ATLAS-1227:
------------------------------------
Attachment: ATLAS-1227.patch
Added support for constraints in entity attributes. Following 2 constraints are added in this patch, which provide equivalent of isComposite and reverseAtributeName fields in AttributeInfo. Using constraints, hive_column.table and hive_table.columns would be modeled as below:
hive_column.table attribute:
{code}
{
"name": "hive_column",
"attributeDefs": [
{
"name": "table",
"typeName": "hive_table",
"constraintDefs": [
{
"type": "foreignKey",
"params": {
"onDelete": "cascade"
}
}
]
}
]
}
{code}
hive_table.columns attribute:
{code}
{
"name": "hive_table",
"attributeDefs": [
{
"name": "columns",
"typeName": "array<hive_column>",
"constraintDefs": [
{
"type": "mappedFromRef",
"params": {
"refAttribute": "table"
}
}
]
}
]
}
{code}
> Add support for attribute constraints in the API
> ------------------------------------------------
>
> Key: ATLAS-1227
> URL: https://issues.apache.org/jira/browse/ATLAS-1227
> Project: Atlas
> Issue Type: Bug
> Reporter: Madhan Neethiraj
> Assignee: Madhan Neethiraj
> Attachments: ATLAS-1227.patch
>
>
> Currently the typesystem supports AttributeInfo fields 'isComposite' and 'reverseAttributeName' - to model relationships between entities like hive_table to hive_column, via attributes columns and table. An equivalent should be made available in the new structured API introduced in ATLAS-1171.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)