late-helicopter-99742
01/19/2023, 4:20 PM@Relationship in datahub. Please see thread for details. Please advise.late-helicopter-99742
01/19/2023, 4:25 PM/**
* Derived From Event Types
*/
@Relationship = {
"/*": {
"name": "DerivesFrom",
"entityTypes": [ "pinterestThriftEnumItem" ],
}
}
derivesFromEventTypes: array[Urn] = []
When we specify the relationships like so
mutation {
updateEventDerivedMetric(urn: "urn:li:eventDerivedMetric:CLICKTHROUGH_TEST_123",
input: {
name: "Clickthrough test 123",
description: "description",
derivesFromEventTypes: [ "urn:li:pinterestThriftEnumItem(ACCEPTED_CONTACT_REQUEST_WARNING_CLICK,EVENT_TYPE)",
"urn:li:pinterestThriftEnumItem:(ACTIONED_USER_REPORT,EVENT_TYPE)"
]
})
}
That works fine. And when we query the relationship on this entity like this:
{
eventDerivedMetric(urn: "urn:li:eventDerivedMetric:CLICKTHROUGH_TEST_123"){
urn
relationships(input: {types: ["DerivesFrom"], direction: OUTGOING}){
relationships {
entity {
urn
}
}
}
}
}
It works and we get
{
"data": {
"eventDerivedMetric": {
"urn": "urn:li:eventDerivedMetric:CLICKTHROUGH_TEST_123",
"relationships": {
"relationships": [
{
"entity": {
"urn": "urn:li:pinterestThriftEnumItem:(ACTIONED_USER_REPORT,EVENT_TYPE)"
}
},
{
"entity": {
"urn": "urn:li:pinterestThriftEnumItem:(ACCEPTED_CONTACT_REQUEST_WARNING_CLICK,EVENT_TYPE)"
}
}
]
}
}
}
}
Looks good. The problem comes when I query the relationship from the other entity using an INCOMING direction. So, using this query
{
pinterestThriftEnumItem(urn: "urn:li:pinterestThriftEnumItem:(ACTIONED_USER_REPORT,EVENT_TYPE)"){
urn
category
relationships(input: {types: ["DerivesFrom"], direction: INCOMING}){
relationships {
entity {
urn
}
}
}
}
}
I get null in the relationship
{
"data": {
"pinterestThriftEnumItem": {
"urn": "urn:li:pinterestThriftEnumItem:(ACTIONED_USER_REPORT,EVENT_TYPE)",
"category": "EVENT_TYPE",
"relationships": null
}
}
}
I expected to get an entity urn:li:eventDerivedMetric:CLICKTHROUGH_TEST_123 under the relationships propechoing-airport-49548
01/20/2023, 12:41 AMdataFetcher for relationships to the PinterestThriftEnumItem type?echoing-airport-49548
01/20/2023, 12:41 AMGmsGraphQLEngine.javalate-helicopter-99742
01/23/2023, 5:45 PMechoing-airport-49548
01/23/2023, 7:59 PM