Skip to content

Commit

Permalink
fix #3077: Fixed validation error in ldap (#3079)
Browse files Browse the repository at this point in the history
* fix #3077: fixed validation error

* removed print

* changes returntype to OMetaUserProfile
  • Loading branch information
ulixius9 committed Mar 3, 2022
1 parent e4e11a7 commit 3f144a7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 79 deletions.
6 changes: 2 additions & 4 deletions ingestion/examples/workflows/ldap_user_to_catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@
}
},
"sink": {
"type": "ldap-rest-users",
"config": {
"api_end_point": "http://localhost:8585/api"
}
"type": "metadata-rest",
"config": {}
},
"metadata_server": {
"type": "metadata-server",
Expand Down
71 changes: 0 additions & 71 deletions ingestion/src/metadata/ingestion/sink/ldap_rest_users.py

This file was deleted.

8 changes: 4 additions & 4 deletions ingestion/src/metadata/ingestion/source/ldap_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,12 @@ def create(
metadata_config = MetadataServerConfig.parse_obj(metadata_config_dict)
return cls(ctx, config, metadata_config)

def next_record(self) -> Iterable[CreateUserRequest]:
def next_record(self) -> Iterable[OMetaUserProfile]:
for user in self.users:
user_metadata = CreateUserRequest(
email=user["attributes"]["mail"],
displayName=user["attributes"]["cn"],
name=user["attributes"]["givenName"],
email=user["attributes"]["mail"][0],
displayName=user["attributes"]["cn"][0],
name=user["attributes"]["givenName"][0],
)
self.status.scanned(user_metadata.name)
yield OMetaUserProfile(user=user_metadata)
Expand Down

0 comments on commit 3f144a7

Please sign in to comment.