You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by "Ashutosh Mestry (JIRA)" <ji...@apache.org> on 2019/07/30 16:49:00 UTC

[jira] [Assigned] (ATLAS-3232) Relationships, Export & Import : Updates to relationshipDef are not honored during import

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

Ashutosh Mestry reassigned ATLAS-3232:
--------------------------------------

    Assignee: Ashutosh Mestry

> Relationships, Export & Import : Updates to relationshipDef are not honored during import
> -----------------------------------------------------------------------------------------
>
>                 Key: ATLAS-3232
>                 URL: https://issues.apache.org/jira/browse/ATLAS-3232
>             Project: Atlas
>          Issue Type: Bug
>          Components:  atlas-core
>            Reporter: Sharmadha Sainath
>            Assignee: Ashutosh Mestry
>            Priority: Major
>             Fix For: trunk
>
>
> # In source cluster , updated relationshipDef "hive_table_db" propagateTags to "ONE_TO_TWO" from NONE and exported.
>  2.In export zip , atlas-typesdef.json has "ONE_TO_TWO" propagateTags value for "hive_table_db" . 
>  3. But in the import cluster, propagateTags value for hive_table_db is NONE still. In the import options , provided updateTypeDefinition to True too.
> _*Steps to Duplicate*_
>  # In source cluster edit _./atlas-server/server/models/1000-Hadoop/1030-hive_model.json_
>  # Go to _+relationshipDefs+_ and update _hive_table_db_ to the following definition:
> {code:java}
>         {
>             "name": "hive_table_db",
>             "serviceType": "hive",
>             "typeVersion": "1.2",
>             "relationshipCategory": "AGGREGATION",
>             "relationshipLabel": "__hive_table.db",
>             "endDef1": {
>                 "type": "hive_table",
>                 "name": "db",
>                 "isContainer": false,
>                 "cardinality": "SINGLE",
>                 "isLegacyAttribute": true
>             },
>             "endDef2": {
>                 "type": "hive_db",
>                 "name": "tables",
>                 "isContainer": true,
>                 "cardinality": "SET"
>             },
>             "propagateTags": "ONE_TO_TWO"
>         }
> {code}
> Note that _propagateTags_ is changed from _NONE_ to _ONE_TO_TWO._
> 3. Perform export using this request:
> {code:java}
> {    
>   "itemsToExport": [
>   {
>     "typeName": "hive_db",
>     "uniqueAttributes": { "qualifiedName": "smalldb16@cl1" }    
>     }], 
>  "options": {"fetchType": "full" }
> }
> {code}
> 4. Perform an import on target cluster with no request parameters.
> 5. Use this REST call to fetch typesDef:
> {code:java}
> http://localhost:21000/api/atlas/v2/types/typedefs
> {code}
> Note the definition of _hive_table_db_.
>  
> _Expected results:_ Import updates _hive_table_db_ on imported cluster_._
> _Observed results:_ Relationship definition for _hive_table_db_ on target cluster remains unchanged.
> CC : [~ashutoshm]



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)