find_dataset_files
Search a dataset's file-group hierarchy for files matching a name pattern (e.g. a date like "20220808"), without ever pulling a large, context-blowing file listing.
Automates the pattern described in get_file_groups: recursively calls
get_file_groups, descending into every child gindex, until a gindex
returns no further children (a leaf group) — then calls get_dataset_files
there with filter_wfile=name_pattern and keeps only the matches. Prefer
this over manually drilling with get_file_groups/get_dataset_files when
you don't already know roughly where in the hierarchy to look.
A dataset's hierarchy can be large (hundreds of leaf groups), and this
tool has no way to know in advance which branches might contain a match,
so it may need to visit many groups to be thorough. Pass start_gindex if
you already know a good starting point (e.g. from a prior get_file_groups
call, or a related dataset's structure) to narrow and speed up the
search. If the number of groups visited hits max_groups_visited, the
search stops early and `stopped_early` comes back true — narrow with
start_gindex and retry, or raise the cap.
Args:
dsid: Dataset ID (dNNNNNN), e.g. d083002
name_pattern: Filename substring/pattern to match, e.g. "20220808" for a date
start_gindex: Optional group index to start the search from, instead of the dataset root
max_groups_visited: Safety cap on groups traversed before giving up (default 300)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dsid | Yes | ||
| name_pattern | Yes | ||
| start_gindex | No | ||
| max_groups_visited | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |