You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add indices_overview code example and troubleshooting for missing columns
Addresses the failure mode where agents query `index` for modality-specific
parameters (SliceThickness, KVP, etc.) instead of using ct_index/mr_index/pt_index.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
19
19
20
20
### Changed
21
21
22
+
- Added concrete `indices_overview` code example showing how to search for a column across all tables and read column schemas without fetching the table; directly addresses the failure mode where agents query `index` for modality-specific parameters (SliceThickness, KVP, etc.) instead of using `ct_index`/`mr_index`/`pt_index`
23
+
- Added troubleshooting entry "Column not found in `index` table" with a working `indices_overview` search snippet and join example, covering common acquisition/reconstruction parameters that live in the modality-specific index tables
22
24
- Updated idc-index reference to 0.12.3
23
25
- Clarified `download_from_selection` API: added explicit warning that it takes filter keyword arguments (not a DataFrame), comparison table vs `download_dicom_series` (which has a different first-argument order), and restructured the download example as a step-by-step query → extract UIDs → pass list flow
24
26
- Documented `download_dicom_series` as an alternative download method with its own signature (`seriesInstanceUID` as first arg, then `downloadDir`)
Copy file name to clipboardExpand all lines: SKILL.md
+38Lines changed: 38 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -126,6 +126,25 @@ The `idc-index` package provides multiple metadata index tables, accessible via
126
126
127
127
**Important:** Use `client.indices_overview` to get current table descriptions and column schemas. This is the authoritative source for available columns and their types — always query it when writing SQL or exploring data structure.
128
128
129
+
```python
130
+
from idc_index import IDCClient
131
+
132
+
client = IDCClient()
133
+
134
+
# Find which table(s) contain a specific column (no fetch required)
135
+
target ="SliceThickness"
136
+
for table_name, info in client.indices_overview.items():
137
+
ifany(c["name"] == target for c in info["schema"]["columns"]):
138
+
print(f"'{target}' is in: {table_name}")
139
+
# → 'SliceThickness' is in: ct_index
140
+
141
+
# List all columns in a table from the schema (no fetch required)
142
+
ct_cols = [c["name"] for c in client.indices_overview["ct_index"]["schema"]["columns"]]
Always call `client.fetch_index("table_name")` before querying any index table — it is safe and idempotent for all tables, including those loaded automatically at startup.
@@ -703,6 +722,25 @@ See `references/bigquery_guide.md` for schemas, column descriptions, and query e
703
722
- Use `LIMIT 5` to test query first
704
723
- Check field names against metadata schema documentation
705
724
725
+
**Issue: Column not found in `index` table (e.g., `SliceThickness`, `PixelSpacing`, `KVP`, `EchoTime`, `InjectedDose`)**
726
+
-**Cause:** The `index` table contains series-level metadata only; modality-specific acquisition and reconstruction parameters live in dedicated tables (`ct_index`, `mr_index`, `pt_index`)
727
+
-**Solution:** Search `client.indices_overview` to find the right table, then fetch and join on `SeriesInstanceUID`:
728
+
```python
729
+
target ="SliceThickness"
730
+
for table_name, info in client.indices_overview.items():
731
+
ifany(c["name"] == target for c in info["schema"]["columns"]):
0 commit comments