-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implements the Data Owner functionality for the Table
Signed-off-by: verdan <[email protected]> Updates Signed-off-by: verdan <[email protected]> Refactoring - Code Reviews Signed-off-by: verdan <[email protected]> Refactoring Signed-off-by: verdan <[email protected]> Updates the test cases, based on owner changes Signed-off-by: verdan <[email protected]> Updates the lambda function definition Signed-off-by: verdan <[email protected]>
- Loading branch information
Showing
5 changed files
with
119 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,22 +2,20 @@ Most of the configurations are set through Flask [Config Class](https://github.c | |
|
||
#### USER_DETAIL_METHOD `OPTIONAL` | ||
This is a method that can be used to get the user details from any third-party or custom system. | ||
This custom function takes user_id as a parameter, and returns a tuple consisting user details defined in [UserSchema](https://github.com/lyft/amundsencommon/blob/master/amundsen_common/models/user.py) along with the status code. | ||
This custom function takes user_id as a parameter, and returns a dictionary consisting user details' fields defined in [UserSchema](https://github.com/lyft/amundsencommon/blob/master/amundsen_common/models/user.py). | ||
|
||
Example: | ||
```python | ||
|
||
def get_user_details(user_id): | ||
from amundsen_common.models.user import UserSchema | ||
from http import HTTPStatus | ||
user_info = { | ||
'email': '[email protected]', | ||
'user_id': user_id, | ||
'first_name': 'Firstname', | ||
'last_name': 'Lastname', | ||
'full_name': 'Firstname Lastname', | ||
} | ||
return UserSchema().dump(user_info).data, HTTPStatus.OK | ||
return user_info | ||
|
||
USER_DETAIL_METHOD = get_user_details | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters