Closed saumier closed 9 months ago
@sahalali Please confirm the payload needed by Aggregator https://docs.google.com/document/d/1AOUiZD3wh-J3M1UDpwBjMhBZm2HfhM_8_NgWCy74LLg/edit?disco=AAAAwUVoXxg
Confirming the payload for the contact point. This should work from the footlight aggregator for Events.
@sahalali I have added contactPoint to the response from Artsdata.
"contactPoint": { "uri": "http://kg.footlight.io/resource/gatineau-cloud_43528#ContactPoint_0", "email": "girard.audrey@gatineau.ca", "name": { "fr": "Ville de Gatineau" }, "telephone": "311" }
Please check that this is being loaded in the CMS via the aggregator.
Verified that the contact points are successfully getting loaded from the aggregator. However, I couldn't review the place or organization since I couldn't find any place or organization with a contact point linked.
Here are a few events that I verified:
Event ID | Same as URL |
---|---|
6495d06195ffd60064aaeac5 | {"uri":"http://kg.artsdata.ca/resource/K23-584"}, {"uri":"http://kg.footlight.io/resource/gatineau-cloud_43598"} |
6495a91b95ffd60064aa96fa | {"uri":"http://kg.artsdata.ca/resource/K23-586"}, {"uri":"http://kg.footlight.io/resource/gatineau-cloud_43609"} |
6495a92095ffd60064aa9761 | {"uri":"http://kg.artsdata.ca/resource/K23-588"}, {"uri":"http://kg.footlight.io/resource/gatineau-cloud_43600"} |
6495a92495ffd60064aa97c8 | {"uri":"http://kg.artsdata.ca/resource/K23-590"}, {"uri":"http://kg.footlight.io/resource/gatineau-cloud_43502"} |
6495a92c95ffd60064aa986e | {"uri":"http://kg.artsdata.ca/resource/K23-593"}, {"uri":"http://kg.footlight.io/resource/gatineau-cloud_43499"} |
6495a92e95ffd60064aa98ad | {"uri":"http://kg.artsdata.ca/resource/K23-594"}, {"uri":"http://kg.footlight.io/resource/gatineau-cloud_43602"} |
Tested by checking the contacts on the source site - looks good to me. cc @saumier @sahalali
@sahalali Most look good but there are some events not getting through like this event that has 2 contacts. http://kg.footlight.io/resource/gatineau-cloud_43464
Since we don't support 2 contacts in the CMS, we can choose just 1 contact to load, until a later time when we support multiple contacts. It is a fairly rare case.
I looked into Datadog and there are lots of errors like this:
Batch 1 :: (8/10). Error while adding Event [object Object]TypeError: Cannot read properties of undefined (reading 'length')
So I am setting this as a bug, and asking if you can fix the errors, even though I don't know if the error is related to "contacts" and/or other properties.
I suspect that the aggregator code should handle cases when the name-value pairs are sometimes lists and sometimes singletons. This is common in JSON-LD and hard for me to control in JSON because I am counting on JSON-LD which makes no difference between a singleton and a list array.
It is also hard to know which event is causing the error. I suggest you add the event id to the error message so we can trace the data back to the source.
Artsdata call for the above event: http://api.artsdata.ca/query?sparql=query_footlight_event_uri&uri=http://kg.footlight.io/resource/gatineau-cloud_43464&frame=event_footlight&format=json&source=http://kg.artsdata.ca/culture-creates/footlight/gatineau-cloud
I’ve taken a look into this. Modified aggregator to load the first contact point if the contactPoint from artsdata is a list. Verified that the events with multiple contact points are handled in the aggregator. Reference:
Event URL :
@sahalali There are still many errors in the Aggregator log reported by Datadog that make it difficult to know why the aggregator does not seem to be working with event types or contact info.
An example error is Batch 16 :: (1/10). Error while adding Event [object Object]InternalServerErrorException: Some thing went wrong
This tells me nothing about which entity failed. Can you add the entity id. Thx.
@sahalali Thanks for adding the entity Id that has the error. I'll close this issue and check the messages the next time the aggregator runs.
Support event contact info coming from Aggregator.