cognitedata / cognitedata/cognite-sdk-python
Allow users to extract only a portion of the data from a file when working with CDF Files.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 92
- Forks
- 38
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 42
Description
Is your feature request related to a problem? Please describe.
One of my use case is expected to extract only a portion of the data from a file that are ingested to CDF Files. Currently there are no options available to extract a portion of the data using any of the download file(s) methods (download-a-single-file-to-a-specific-path, download-a-file-as-bytes).
Blob storage supports Range header to allow users to extract a portion of the data. Details about the Range header can be found here Range
Describe the solution you'd like
Extend the file download methods (download-a-single-file-to-a-specific-path, download-a-file-as-bytes) to accept range parameter and add them as headers when downloading the file contents from blob storage.
Describe alternatives you've considered
Tried to use retrieve-download-urls and add custom headers but would like to keep this as part of SDK.
Additional context
None.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the SDK entry points documented as download-a-single-file-to-a-specific-path and download-a-file-as-bytes, then trace how each sends the file-content request. Add support for a range parameter that becomes a blob-storage Range header, and verify both download methods return only the requested portion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100