Created
January 9, 2023 20:30
-
-
Save Zmey56/44ea3c4661310deb0466949af5d1ff0d to your computer and use it in GitHub Desktop.
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
def get_group_by_expression(slice, group_by_slices_list, all_data=False): | |
if not all_data: | |
group_by_expression = ' date' | |
else: | |
group_by_expression = ' date, toStartOfFifteenMinutes(time) as time, time_' | |
if slice != 'total': | |
alias = group_by_slices_list[slice]['alias'] | |
group_by_expression = group_by_expression + ',' + alias | |
return group_by_expression |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment