Comments (5)
I've added anonymous authentication to AzureBlobFileSystem with #106 and #107 so the above goes example works as follows:
storage_options = {'account_name': 'goes'}
fs = AzureBlobFileSystem(**storage_options)
fs.ls("noaa-goes16")
An example Jupyter Notebook on Azure can be found here. The above doesn't work if you just try fs.ls("/")
.
I believe @raybellwaves is right -- the trick is making sure you get the account_name and container right.
BTW -- The GOES data is stored in xarray, so I didn't try opening the file.
Also successfully accessed the data here as follows:
storage_options={"account_name": "hlssa"}
fs = AzureBlobFileSystem(**storage_options)
fs.ls("hls")
ddf = dd.read_csv("abfs://hls/S2_TilingSystem2-1.txt", storage_options=storage_options)
Both .head() and .tail() work
tag: @lostmygithubaccount
from adlfs.
from adlfs.
I believe public data in Azure is stored in a slightly different way to AWS.
For example,GOES-16 on az is stored at https://goes.blob.core.windows.net. What's the nomenclature for this in az/adlfs connection_string? what you call the goes part? storage name? blob name?
I see an example here: BlobEndpoint=https://storagesample.blob.core.windows.net;
. Once you have that you can access the data in the noaa-goes16
container. e.g. the path to a file would be noaa-goes16/ABI-L2-MCMIPF/2020/001/00/OR_ABI-L2-MCMIPF-M6_G16_s20200010000216_e20200010009536_c20200010010028.nc
For reference if you mount the blob the Storage Explorer you see addition info when copying the file
{"CloudHub.Azure.Storage.Blobs":{"connectionString":"BlobEndpoint=https://goes.blob.core.windows.net;SharedAccessSignature=","containerName":"noaa-goes16","subscription":null,"accountUri":"https://goes.blob.core.windows.net","sourceFolder":"ABI-L2-MCMIPF/2020/001/00/","items":[{"relativePath":"OR_ABI-L2-MCMIPF-M6_G16_s20200010000216_e20200010009536_c20200010010028.nc","snapshot":""}],"sasToken":"","service":"blob"}}
In AWS (and using s3fs) you can grab a file (note files do not overlap as have different frequency) as:
import s3fs
fs = s3fs.S3FileSystem(anon=True)
file = "OR_ABI-L2-MCMIPC-M6_G16_s20200010001184_e20200010003557_c20200010004112.nc"
fs.get("noaa-goes16/ABI-L2-MCMIPC/2020/001/00/{}".format(file), file)
Therefore would probably need extra arg
adlfs.AzureBlobFileSystem(credential=None, storage_name="goes")
That's because other datasets are hosted on different storage
e.g. https://azure.microsoft.com/en-us/services/open-datasets/catalog/hls/ is at https://hlssa.blob.core.windows.net
from adlfs.
are there any workarounds to read from public blobs currently? trying to read from Azure open datasets hosted on a public blob
from adlfs.
will this be published to pypi
soon @hayesgb ?
from adlfs.
Related Issues (20)
- await file_obj.credential.close() : TypeError: object NoneType can't be used in 'await' expression HOT 4
- update readme HOT 1
- Support py3.12
- `find` doesn't accept `maxdepth` parameter HOT 1
- Add use_emulator setting to better align with object_store crate HOT 1
- Current state of the library, milestones and current development HOT 1
- Concurrent download of multiple files HOT 1
- Support virtual directory stubs with uppercase "Hdi_isfolder" metadata HOT 1
- Feature Suggestion: Optional content type when for writing file HOT 2
- Support passing url in AzureBlobFileSystem HOT 1
- Add comment why `aiohttp` is required
- Fix typo in repo About
- Python 3.12 support blocked by aiohttp HOT 1
- Feature Request: Support for Adding Metadata to Blobs
- Runtime warning from missing await HOT 2
- `fs.info()` and `fs.ls(detail=True)` return different etag formats
- Issue with parallel uploads to the same blob
- Can I use a bearer token / entra ID token for authentication? HOT 1
- Parameter anon ignored if set to False
- exists() is missing **kwargs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adlfs.