odc-tools icon indicating copy to clipboard operation
odc-tools copied to clipboard

s3-to-dc glob error

Open kieranricardo opened this issue 3 years ago • 1 comments

s3-to-dc can't parse glob urls like s3://dea-public-data/fractional-cover/fc-percentile/annual/v2.2.0/combined/**/2020/*.yaml. It seems like specify a subfolder after the * or ** patterns causes parse_query to throw:

ValueError: Bad query: ...

kieranricardo avatar Mar 16 '21 06:03 kieranricardo

not supported currently, /**/ stands for any number of sub-folders, and only allow this to be followed by "file pattern", so ../**/<file-pattern>.

I feel we should probably just support arbitrary grep patterns instead, but then you still need to list all the paths (slow) and then discard those that do not match.

Kirill888 avatar Mar 16 '21 23:03 Kirill888