Skip to content
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

Fix karma point collection and open lineage publication #8371

Merged
merged 2 commits into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CoreContentPackGUIDMap.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/CoreContentPack.omarchive

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public void processEvent(AssetManagerOutTopicEvent event)
try
{
String previousActionStatus = getActionStatus(event.getPreviousElementProperties());
String currentActionStatus = getActionStatus(event.getPreviousElementProperties());
String currentActionStatus = getActionStatus(event.getElementProperties());

/*
* Only output an event if the status has changed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public B getNewComplexBean(Class<B> beanClass,
UserIdentityElement userBean = new UserIdentityElement();
UserIdentityProperties userProperties = new UserIdentityProperties();

bean.setElementHeader(this.getMetadataElementHeader(beanClass, entity, methodName));
userBean.setElementHeader(this.getMetadataElementHeader(beanClass, entity, methodName));

InstanceProperties entityProperties = new InstanceProperties(entity.getProperties());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -968,16 +968,16 @@ public B getActorProfileByGUID(String userId,
* @throws UserNotAuthorizedException the user is not authorized to issue this request
* @throws PropertyServerException there is a problem reported in the open metadata server(s)
*/
public B getActorProfileForUser(String userId,
String profileUserId,
String profileUserIdParameterName,
String typeName,
boolean forLineage,
boolean forDuplicateProcessing,
Date effectiveTime,
String methodName) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException
public EntityDetail getActorProfileEntityForUser(String userId,
String profileUserId,
String profileUserIdParameterName,
String typeName,
boolean forLineage,
boolean forDuplicateProcessing,
Date effectiveTime,
String methodName) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException
{
final String userGUIDParameterName = "userIdentity.getGUID";

Expand All @@ -997,36 +997,79 @@ public B getActorProfileForUser(String userId,

if (userIdentity != null)
{
EntityDetail entity = this.getAttachedEntity(userId,
userIdentity.getGUID(),
userGUIDParameterName,
OpenMetadataType.USER_IDENTITY_TYPE_NAME,
OpenMetadataType.PROFILE_IDENTITY_RELATIONSHIP_TYPE_GUID,
OpenMetadataType.PROFILE_IDENTITY_RELATIONSHIP_TYPE_NAME,
typeName,
1,
forLineage,
forDuplicateProcessing,
supportedZones,
effectiveTime,
methodName);

if (entity != null)
{
return getFullProfileBean(userId,
entity,
return this.getAttachedEntity(userId,
userIdentity.getGUID(),
userGUIDParameterName,
OpenMetadataType.USER_IDENTITY_TYPE_NAME,
OpenMetadataType.PROFILE_IDENTITY_RELATIONSHIP_TYPE_GUID,
OpenMetadataType.PROFILE_IDENTITY_RELATIONSHIP_TYPE_NAME,
typeName,
1,
forLineage,
forDuplicateProcessing,
supportedZones,
effectiveTime,
methodName);
}
}

return null;
}


/**
* Retrieve the profile metadata element with the supplied unique identifier.
*
* @param userId calling user
* @param profileUserId unique name of the linked user id
* @param profileUserIdParameterName parameter name of profileUserId
* @param typeName unique name of the type of the profile to retrieve
* @param forLineage the request is to support lineage retrieval this means entities with the Memento classification can be returned
* @param forDuplicateProcessing the request is for duplicate processing and so must not deduplicate
* @param effectiveTime the time that the retrieved elements must be effective for (null for any time, new Date() for now)
* @param methodName calling method
*
* @return matching metadata element
*
* @throws InvalidParameterException one of the parameters is invalid
* @throws UserNotAuthorizedException the user is not authorized to issue this request
* @throws PropertyServerException there is a problem reported in the open metadata server(s)
*/
public B getActorProfileForUser(String userId,
String profileUserId,
String profileUserIdParameterName,
String typeName,
boolean forLineage,
boolean forDuplicateProcessing,
Date effectiveTime,
String methodName) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException
{
EntityDetail entity = this.getActorProfileEntityForUser(userId,
profileUserId,
profileUserIdParameterName,
typeName,
forLineage,
forDuplicateProcessing,
effectiveTime,
methodName);

if (entity != null)
{
return getFullProfileBean(userId,
entity,
typeName,
forLineage,
forDuplicateProcessing,
effectiveTime,
methodName);
}

return null;
}



/**
* Retrieve the profile metadata element with the supplied unique identifier.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public enum IntegrationConnectorDefinition
"OpenLineageFilePublisher",
"olfilepubnpa",
null,
null,
"logs/openlineage",
null,
60,
new DeployedImplementationType[]{DeployedImplementationType.FILE_FOLDER, DeployedImplementationType.DATA_FOLDER}),
Expand Down
Loading