Example:
For a file gs://test-input/test-file.grib the output file pattern is gs://test-output/splits/test-file_{date}-{time}.grib.
Then for date = 20200101, time = 1200, the output file for that split will be gs://test-output/splits/test-file_20200101-1200.grib.
But what if user want's output file as gs://test-output/splits/test-file_20200101-12:00:00.grib -- basically format date & time as per the need.
For such cases he can provide output file pattern as gs://test-output/splits/test-file_{date}-{datetime.strptime(f"{time}", "%H%M").strftime("%H:%M:%S")}.grib.
Make necessary changes for supporting this :) most probably just need to import datetime library and minor tweaking in logic.
Example:
For a file
gs://test-input/test-file.gribthe output file pattern isgs://test-output/splits/test-file_{date}-{time}.grib.Then for date = 20200101, time = 1200, the output file for that split will be
gs://test-output/splits/test-file_20200101-1200.grib.But what if user want's output file as
gs://test-output/splits/test-file_20200101-12:00:00.grib-- basically format date & time as per the need.For such cases he can provide output file pattern as
gs://test-output/splits/test-file_{date}-{datetime.strptime(f"{time}", "%H%M").strftime("%H:%M:%S")}.grib.Make necessary changes for supporting this :) most probably just need to import
datetimelibrary and minor tweaking in logic.