-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DG-1746 Support custom relationshipDef for any Assets linking #3479
base: master
Are you sure you want to change the base?
Conversation
if (map.containsKey(AtlasRelatedObjectId.KEY_RELATIONSHIP_ATTRIBUTES) && !map.containsKey(AtlasRelatedObjectId.KEY_RELATIONSHIP_TYPE)) { | ||
return false; | ||
} | ||
|
||
if (guid != null && StringUtils.isNotEmpty(guid.toString())) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sample
"appendRelationshipAttributes": {
"userDefRelationshipTo": [
{
"guid": "6549985b-b6cc-430f-9042-cbb515847536",
"typeName": "Table",
"relationshipType": "UserDefRelationship",
"relationshipAttributes": {
"attributes": {
"toType": "Classifiedby",
"fromType": "Isa"
}
}
}
],
}
relationshipAttributes.put("attributes", relationship.getAttributes()); | ||
ret.getAttributes().put("relationshipAttributes", relationshipAttributes); | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sample
{
"typeName": "Table",
"attributes": {
"userDefRelationshipTo": [],
"qualifiedName": "target_table_qualified_name",
"name": "target_table",
"userDefRelationshipFrom": [
{
"guid": "8762fc1f-c10c-4caf-9539-ea529a936f4c",
"typeName": "Table",
"attributes": {
"relationshipAttributes": {
"typeName": "UserDefRelationship",
"attributes": {
"toType": "classifiedBy",
"fromType": "isA"
}
},
"name": "source_table"
},
"uniqueAttributes": {
"qualifiedName": "source_table_qualified_name"
}
}
]
},
"guid": "de28c2a9-0ce3-48b3-83d4-3998187e13a6",
"status": "ACTIVE",
"displayText": "target_table",
"classificationNames": [],
"classifications": [],
"meaningNames": [],
"meanings": [],
"isIncomplete": false,
"labels": [],
"createdBy": "service-account-atlan-argo",
"updatedBy": "service-account-atlan-argo",
"createTime": 1723215374293,
"updateTime": 1723215374293
}
repository/src/main/java/org/apache/atlas/tasks/TaskExecutor.java
Outdated
Show resolved
Hide resolved
indexsearchMetric.addTag("utmTag", "other"); | ||
indexsearchMetric.addTag("source", "other"); | ||
for (String utmTag : parameters.getUtmTags()) { | ||
if (TRACKING_UTM_TAGS.contains(utmTag)) { | ||
indexsearchMetric.addTag("utmTag", utmTag); | ||
break; | ||
} | ||
} | ||
if (parameters.getUtmTags().contains(UTM_TAG_FROM_PRODUCT)) { | ||
indexsearchMetric.addTag("source", UTM_TAG_FROM_PRODUCT); | ||
} | ||
indexsearchMetric.addTag("name", RELATIONSHIP_INDEXSEARCH_TAG_NAME); | ||
indexsearchMetric.setTotalTimeMSecs(System.currentTimeMillis() - startTime); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check this with Suman
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can skip it for now, we have added this metric to track indexsearch only which is very important. Do you think this endpoint would be very important to track by utmTags?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not important now as we are not returning any asset with this API.
We only support aggregations which should never be stored as a search metric, we can add it later once this API supports returning assets
f03d4d2
to
9b702f4
Compare
9b702f4
to
1c4bdd8
Compare
indexsearchMetric.addTag("utmTag", "other"); | ||
indexsearchMetric.addTag("source", "other"); | ||
for (String utmTag : parameters.getUtmTags()) { | ||
if (TRACKING_UTM_TAGS.contains(utmTag)) { | ||
indexsearchMetric.addTag("utmTag", utmTag); | ||
break; | ||
} | ||
} | ||
if (parameters.getUtmTags().contains(UTM_TAG_FROM_PRODUCT)) { | ||
indexsearchMetric.addTag("source", UTM_TAG_FROM_PRODUCT); | ||
} | ||
indexsearchMetric.addTag("name", RELATIONSHIP_INDEXSEARCH_TAG_NAME); | ||
indexsearchMetric.setTotalTimeMSecs(System.currentTimeMillis() - startTime); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can skip it for now, we have added this metric to track indexsearch only which is very important. Do you think this endpoint would be very important to track by utmTags?
Change description
Hagerty (Customer) wants a way to define custom objects that are built on top of Atlan’s Assets interface, create custom definitions for relationships between 2 arbitrary assets and want some properties on the relationship as well.
Overall we try to keep it very generic to make it GA.
Type of change
Related issues
DG-1746 Support custom relationshipDef for any Assets linking
Checklists
Development
Security
Code review