cognitedata / cognitedata/cognite-sdk-python

Allow users to extract only a portion of the data from a file when working with CDF Files.

Open
#1,089 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.