def __get_destination_directory_client_based_on_event_time(directory_client: DataLakeDirectoryClient, event_time: str) -> DataLakeDirectoryClient: event_time_obj, time_resolution = parse_date_str(event_time) path = get_file_path_with_respect_to_time_resolution(event_time_obj, time_resolution, '') return directory_client.get_sub_directory_client(path)
def __get_destination_directory_client_based_on_ingress_time(directory_client: DataLakeDirectoryClient) \ -> DataLakeDirectoryClient: now = datetime.utcnow() path = f'year={now.year:02d}/month={now.month:02d}/day={now.day:02d}/hour={now.hour:02d}' return directory_client.get_sub_directory_client(path)