Best practice for using `rename_target_files`
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 366
- Forks
- 96
- Avg merge
- 24m
- Merged PRs (30d)
- 1
Description
We've created some references for NetCDF3-64bit-offset files, which we need to do locally (since we can't access them from object storage).
So to convert the local combined64.json to point to the files on object storage, we did:
from kerchunk.utils import rename_target_files
rename_target_files('combined64.json',
{'/shared/users/rsignell/data/jzambon/nc64/his_20231027.nc':'s3://rsignellbucket1/jzambon/his_20231027.nc',
'/shared/users/rsignell/data/jzambon/nc64/his_20231029.nc':'s3://rsignellbucket1/jzambon/his_20231029.nc',
'/shared/users/rsignell/data/jzambon/nc64/his_20231030.nc':'s3://rsignellbucket1/jzambon/his_20231030.nc',
'/shared/users/rsignell/data/jzambon/nc64/his_20231031.nc':'s3://rsignellbucket1/jzambon/his_20231031.nc'},
'combined64_s3.json')
which works fine for our test case (4 files), but we are guessing there is a smarter way for lots of URLs, right?
Contributor guide
No contributing guide indexed for this repository
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 at the kerchunk.utils.rename_target_files entry point and review the example using combined64.json and combined64_s3.json. Determine whether the current interface has a recommended approach for replacing many local URLs with object-storage URLs; done means that best practice is documented for larger URL sets.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cloud, data
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100