Does anyone know why inserting a new role membersh...
# troubleshoot
b
Does anyone know why inserting a new role membership for a user directly into MySQL table
metadata_aspect_v2
doesn't reflect the role on the UI? I've inserted the aspect in the same format as the UI does. I've set column
version
=0, to make it the most recent. Even after deleting the old roleMembership aspect rows from the database for this user, it still shows up on the UI with the role that has already been deleted from the database ("Reader") instead of the new role ("Admin"). I've refreshed the UI, and even signed in from a new incognito window, so it's not browser caching. But it looks like there's some other sort of caching in the backend service. I know we can set roles using the graphQL API, but I'm exploring Datahub architecture/code and I'd like to understand why this happens. Thank you.
a
Hi @brief-oyster-50637, what version are you on? @big-carpet-38439 might be able to speak to this
b
0.10.0.6 - I just fresh installed today. Thank you @astonishing-answer-96712
b
@brief-oyster-50637 We strongly recommend against mutating the MySQL database directly, as this bypasses all of our wonderful business logic that runs when real data is ingested 🙂 In this case, the role update will not have been reflected in our secondary index of elasticsearch, since no MetadataChangeLog event has been emitted when you insert directly into the DB. Hope this helps! We recommend using the ingest path way (e.g. ingest from a file) to do this.