-
Notifications
You must be signed in to change notification settings - Fork 40
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
Genesys validate_df #782
Genesys validate_df #782
Conversation
@@ -488,6 +497,8 @@ def run( | |||
end = end_date.replace("-", "") | |||
|
|||
file_name = f"WEBMESSAGE_{start}-{end}.csv" | |||
if validate_df_dict: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to check whether validate_df_dict
exists or, on the contrary, is None
, I would recommend one of the following structures:
if validate_df_dict is not None:
or, the best one:
if isinstance(validate_df_dict, dict):
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the suggestion! For now, I won't be changing it because this if statement format is used in every flow that uses validate_df
@@ -327,6 +334,8 @@ def run( | |||
report_columns (List[str], optional): List of exisiting column in report. Defaults to None. | |||
conversationId_list (List[str], optional): List of conversationId passed as attribute of GET method. Defaults to None. | |||
key_list (List[str], optional): List of keys needed to specify the columns in the GET request method. Defaults to None. | |||
validate_df_dict (Dict[str,Any], optional): A dictionary with optional list of tests to verify the output dataframe. If defined, triggers | |||
the `validate_df` task from task_utils. Defaults to None. | |||
|
|||
Returns: | |||
List[str]: List of file names. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I leave it here because I can't leave a comment in the correspondent line.
In line 463
you have another data frame where to apply the same function. Or do you want to apply that functionality only to that specific view type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, have a look at the two comments and let me know if you have doubts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I told Angelika, applying this function to some endpoints in Genesys, is quite tricky and might make the flow fail.
I'm going to approve it because if nothing is passed, it can't break the flow, but I rather recommend before changing any flow, contacting the owner and asking first.
Summary
Added new parameter to flow and task
Importance
data validation
Checklist
This PR:
CONTRIBUTING.md
CHANGELOG.md