Skip to content

Commit

Permalink
Refine ParquetDataCatalog path globbing
Browse files Browse the repository at this point in the history
  • Loading branch information
cjdsellers committed Apr 19, 2024
1 parent 54489e4 commit 0b4a3a5
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions nautilus_trader/persistence/catalog/parquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,14 +420,10 @@ def backend_session(
assert self.fs.exists(path)
# Parse the parent directory which *should* be the instrument ID,
# this prevents us matching all instrument ID substrings.
parent_dir = path.split("/")[-2]
if instrument_ids and not any(
parent_dir.startswith(urisafe_instrument_id(x)) for x in instrument_ids
):
dir = path.split("/")[-2]
if instrument_ids and not any(dir == urisafe_instrument_id(x) for x in instrument_ids):
continue
if bar_types and not any(
parent_dir.startswith(urisafe_instrument_id(x)) for x in bar_types
):
if bar_types and not any(dir == urisafe_instrument_id(x) for x in bar_types):
continue
table = f"{file_prefix}_{idx}"
query = self._build_query(
Expand Down

0 comments on commit 0b4a3a5

Please sign in to comment.