Closed amorskoy closed 2 years ago
I have discovered, that unlike other entities in my instance, corpUser is empty in both ElasticSearch (no data in index) and Neo4j (no corpuser nodes)
Seems that Bug is resolved, if I ingest CorpUser specifying URN in both places inside proposedSnapshot
:
If I miss p.2 - entity is not ingested into ElasticSearch, as username
is the only @Searchable
there. Intuitively I would expect, that CorpUserKey aspect is not needed, as I am already specifying urn in snapshot.
Does anybody know why do we preform p.1 and p.2 at the same time?
Closing due to inactivity. Please open new issue if issue persists with latest releases and updated docs. Please reach out on datahub slack for questions.
Describe the bug I can not search and retrieve all users in 0.8.1. Get single corpuser work fine
To Reproduce Steps to reproduce the behavior:
from poc.datahub.demo.common.datahub_client import DataHubClient
TAG_AUTOMATION = TagAssociation("urn:li:tag:automation") TAG_PERSON = TagAssociation("urn:li:tag:person")
def _make_user_mce(user_urn, email, full_name, tag): mce = MetadataChangeEvent( proposedSnapshot=CorpUserSnapshot( urn=user_urn, aspects=[ CorpUserInfo( active=True, email=email, fullName=full_name ), GlobalTags( tags=[tag] ), ], ) )
def register_users(): user_andrey_urn = "urn:li:corpuser:andrey" user_etl_urn = "urn:li:corpuser:etl" andrey_mce = _make_user_mce(user_andrey_urn, "andrey@company.com", "Andrey The Scientist", TAG_PERSON) etl_mce = _make_user_mce(user_etl_urn, "etl@company.com", "ETL actor", TAG_AUTOMATION)
curl 'http://localhost:8080/corpUsers/($params:(),name:etl)' -H 'X-RestLi-Protocol-Version:2.0.0' -s | jq
curl -H 'X-RestLi-Protocol-Version:2.0.0' -H 'X-RestLi-Method: get_all' 'http://localhost:8080/corpUsers' | jq
{ "elements": [], "paging": { "count": 10, "start": 0, "links": [] } }
curl "http://localhost:8080/corpUsers?q=search&input=*&" -X GET -H 'X-RestLi-Protocol-Version: 2.0.0' -H 'X-RestLi-Method: finder' | jq
{ "metadata": { "urns": [], "searchResultMetadatas": [] }, "elements": [], "paging": { "count": 10, "start": 0, "total": 0, "links": [] } }