Cade,
In addition to including entity data, Atlas export operation includes details of entity-relationships, entity-classifications and all typedefs referenced by the entities. Here is the sample export command line: curl -X POST -u user:password -H "Accept: application/zip" -H "Content-Type: application/json" http://atlas-host:port/api/atlas/admin/export -d '{ "itemsToExport": [ { "typeName": "hive_db", "uniqueAttributes": { "qualifiedName": "hortoniabank@cl1" } } ], "options": { "matchType":"equals", "fetchType":"connected" }}' > export-hive_db-hortoniabank.zip Here is the exported data for ‘hortoniabank’ database entity, which includes details of its relationships with 3 tables – please see inside relationshipAttributes: { "entity": { "guid": "7bede7f3-3ad6-4051-a79a-6d97c8e42de2", "typeName": "hive_db", "attributes": { "qualifiedName": "hortoniabank@cl1", ... }, "classifications": [ { "typeName": "FINANCE", ... } ], "relationshipAttributes": { "tables": [ { "displayText": "ww_customers", "entityStatus": "ACTIVE", "guid": "247887d3-bf6b-4ae7-8ba8-cb3ed9fdbc9d", "relationshipAttributes": { "typeName": "hive_table_db" }, "relationshipGuid": "aacba4bb-9cbd-4b50-b3e0-4d27270c90a3", "relationshipStatus": "ACTIVE", "typeName": "hive_table" }, { "displayText": "us_customers", "entityStatus": "ACTIVE", "guid": "707b380b-3524-4a61-bfde-696f8002ff22", "relationshipAttributes": { "typeName": "hive_table_db" }, "relationshipGuid": "8a5c8185-1b99-4f95-9d02-7d06c303dce0", "relationshipStatus": "ACTIVE", "typeName": "hive_table" }, { "displayText": "eu_countries", "entityStatus": "ACTIVE", "guid": "1bb2aa5e-d589-4350-afa6-b5fd75a41ccc", "relationshipAttributes": { "typeName": "hive_table_db" }, "relationshipGuid": "0b7fddbd-3d0a-417d-aeb0-dd678fb62e01", "relationshipStatus": "ACTIVE", "typeName": "hive_table" } ] }, ... } } Hope this helps. Getting back to your requirement on type-system updates: Atlas doesn’t allow certain changes due to complexities, like: - addition of mandatory attribute would require populating existing entities with default value - removal of attributes might require cleaning up the index stored in Solr (or whatever the index backend is); there may not be a clean way to remove index. Such changes can take a very long time for Atlas instances having large amount of data. However, I understand this is a very critical usecase for you, hence you are taking a tedious approach of export/cleanup/import. If you can enumerate specific changes you are looking for, we can look at the feasibility of adding support for these cases. Thanks, Madhan From: Cade Parker <[email protected]> Reply-To: "[email protected]" <[email protected]> Date: Wednesday, November 28, 2018 at 3:04 PM To: "[email protected]" <[email protected]> Subject: Exporting/Importing Relationships Is it possible to export relationships along with the entities when using the export API? My use case is trying to make a backwards incompatible change to the type system by exporting all entities of the type I want to change, delete all of the entities of that type (including the relationships that use that type), modify the entities and the typedef(s) from the export locally, and import the modified entities with the import API. However, I can't seem to find an option or see any behavior that exporting/importing relationships is possible. Is the expectation that when you export from Atlas and re-import, that the relationships need to be recreated? How would a data migration from one Atlas instance to another work using the Export/Import APIs, and how does it affect the relationships of those entities? Thanks, Cade Parker, Civitas Learning Inc.
