Skip to content

Instantly share code, notes, and snippets.

@abajwa-hw
Last active September 15, 2018 01:04
Show Gist options
  • Save abajwa-hw/80d0afe00795719e6f9ac3d8659fce3a to your computer and use it in GitHub Desktop.
Save abajwa-hw/80d0afe00795719e6f9ac3d8659fce3a to your computer and use it in GitHub Desktop.
Export Hive DB artifacts from Atlas to zip
curl -X POST -u admin:admin -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{
"itemsToExport": [
{ "typeName": "kafka_topic", "uniqueAttributes": { "name": "FOREX" } },
{ "typeName": "kafka_topic", "uniqueAttributes": { "name": "PRIVATE" } },
{ "typeName": "hbase_table", "uniqueAttributes": { "name": "T_FOREX" } },
{ "typeName": "hbase_table", "uniqueAttributes": { "name": "T_PRIVATE" } },
{ "typeName": "hive_db", "uniqueAttributes": { "name": "finance" } },
{ "typeName": "hive_db", "uniqueAttributes": { "name": "hortoniabank" } },
{ "typeName": "hive_db", "uniqueAttributes": { "name": "cost_savings" } },
{ "typeName": "hive_db", "uniqueAttributes": { "name": "consent_master" } },
{ "typeName": "hive_db", "uniqueAttributes": { "name": "erasure_master" } },
{ "typeName": "hive_db", "uniqueAttributes": { "name": "claim" } }
],
"options": null
}' "http://localhost:21000/api/atlas/admin/export" > hortonia-atlas-artifacts.zip
#export individual tag
curl -u admin:BadPass#1 -X GET http://$(hostname -f):21000/api/atlas/v2/types/classificationdef/name/ENCRYPTED | python -m json.tool
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment