Created 03-14-2018 12:16 PM
Hi,
Please let me know where i need to put the description value in below CURL command
curl -v -u admin:admin -H "Content-Type: application/json" -X PUT -d '[ { "typeName": "Test", "attributes": { "attr1":"valu1", "attr2":true, "attr3": 60 } }, { "typeName": "Test", "attributes": { "attr4":"valu1", "attr5":true, "attr6": 60 }} ]' http://localhost:21000/api/atlas/v2/entity/guid/686bbea3-0c7b-41f1-98af-9feddb6f741f/classifications
Thanks in advance..!!!
Created 03-14-2018 03:48 PM
Are you trying to add a description to a tag? If so you are using the wrong API. The one you are using is to add tags to entities, like hive tables.
To add a description to a tag you need to use /v2/types/typedefs (POST to add a new tag and PUT to edit an existing one )- see https://atlas.apache.org/api/v2/ui/index.html#!/TypesREST/resource_TypesREST_createAtlasTypeDefs_POS...
{
"classificationDefs":[
{
"createdBy": "admin",
"name": "test_tag_name",
"description": "Description of your tag",
"attributeDefs": [
{
"name":"attribute_name_1",
"typeName":"string",
"isOptional":"true",
"isUnique":"false",
"isIndexable":"true",
"cardinality":"SINGLE"
},
{
"name":"attribute_name_2",
"typeName":"string",
"isOptional":"true",
"isUnique":"false",
"isIndexable":"true",
"cardinality":"SINGLE"
},
{
"name":"update_date",
"typeName":"date",
"isOptional":"true",
"isUnique":"false",
"isIndexable":"true",
"cardinality":"SINGLE"
}],
"superTypes": []
}
]
}
Created 03-14-2018 03:48 PM
Are you trying to add a description to a tag? If so you are using the wrong API. The one you are using is to add tags to entities, like hive tables.
To add a description to a tag you need to use /v2/types/typedefs (POST to add a new tag and PUT to edit an existing one )- see https://atlas.apache.org/api/v2/ui/index.html#!/TypesREST/resource_TypesREST_createAtlasTypeDefs_POS...
{
"classificationDefs":[
{
"createdBy": "admin",
"name": "test_tag_name",
"description": "Description of your tag",
"attributeDefs": [
{
"name":"attribute_name_1",
"typeName":"string",
"isOptional":"true",
"isUnique":"false",
"isIndexable":"true",
"cardinality":"SINGLE"
},
{
"name":"attribute_name_2",
"typeName":"string",
"isOptional":"true",
"isUnique":"false",
"isIndexable":"true",
"cardinality":"SINGLE"
},
{
"name":"update_date",
"typeName":"date",
"isOptional":"true",
"isUnique":"false",
"isIndexable":"true",
"cardinality":"SINGLE"
}],
"superTypes": []
}
]
}
Created 03-15-2018 08:21 AM
@Laura Ngo , Thanks for u r quick response,
I tried with POST and http://localhost:21000/api/atlas/v2/types/typedefs ,
Command executed fine and no errors are showing
But new value is not reflected , Still its showing old Typedefs
New Typedef not added
Can you please help on this...!!!
Thanks in Advance
Created 03-15-2018 08:16 PM
If you want to change something you need to use PUT. Use POST to add new tags.
Created 03-16-2018 06:03 AM
@Laura Ngo , I tried with POST also , Same issue, Its not reflecting
Created 03-18-2018 06:25 PM
Do you see any exceptions in the logs?
Created 03-20-2018 07:28 AM
@Ashutosh Mestry , Its Syntax Mistake, Now working Fine..Thanks....!!!