astropy / astropy/asdf-astropy
Access table metadata without loading data
- Dominant language
- Python
- Stars
- 19
- Forks
- 22
- Avg merge
- 6h 1m
- Merged PRs (30d)
- 1
Description
Hello =)
Is it possible to access only the metadata of e.g. Qtables stored in the .asdf file-format without loading the data itself into memory? I tried to use `QTable.read()` with a `find_table ` key-word but `tree["data"]["meta"]` will result in an error since the meta-data alone does not represent a table.
In the [asdf documentation](https://asdf.readthedocs.io/en/latest/asdf/overview.html#reading-files) they state that "Array data remains unloaded until it is explicitly accessed". Therefore I thought it might be possible.
Here is a try using the example-data (QTable) from https://github.com/astropy/asdf-astropy/issues/118 :
```
# For the export of example data see issue 118
import asdf
# Is this only loading the meta-data into memory?
with asdf.open("Nr42_fluxgenerator.asdf") as af:
meta = af["data"].meta
```
Or is a simple
```
meta = QTable.read("Nr42_fluxgenerator.asdf").meta
```
already doing the job without reading the table data into memory? Otherwise, would it be useful to be implemented into astropy somehow?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the issue's asdf.open and QTable.read examples with the referenced Nr42_fluxgenerator.asdf data. Determine whether either path accesses table data when only metadata is requested; done means the supported behavior and any required metadata-only API are clearly established.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100