Find datasets¶
Always start from a team and project. Then filter. Do not scrape every dataset in the org.
By parameter¶
project = cs.projects["cable-qual"]
lot15 = list(project.datasets.filter(cs.params.lot == "15"))
Values are strings. == 15 (integer) will not match "15".
Two keys: filter one, then check the other in Python:
matches = [
ds
for ds in project.datasets.filter(cs.params.lot == "15")
if ds.params.get("instrument") == "182"
]
Missing keys: ds.params.get("sn") is None (or absent). That is how you answer “which of these have no serial-number parameter?”
By name¶
project.datasets # all in the project
project.datasets["sweep-25c"] # exact
project.datasets["sweep-*"] # glob on name
Prefer parameters over clever filenames. Names are for humans; parameters are for queries.
By tag¶
Tags are team-wide labels applied to datasets (needs-review, golden, outlier). In the app, filter the project by tag. In scripts, list datasets and keep those that carry the tag you resolved by name. Get-or-create tags by name so you do not mint a duplicate needs-review.
Reporting results¶
A good answer to “which datasets…” — from a script or from the assistant — states the project, the filter, and the count, then the names (or a sample). That is the same discipline as bulk edits, minus the write.