Giter VIP home page Giter VIP logo

Comments (5)

hayesgb avatar hayesgb commented on May 27, 2024 2

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.

hayesgb avatar hayesgb commented on May 27, 2024 1

from adlfs.

raybellwaves avatar raybellwaves commented on May 27, 2024

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.

lostmygithubaccount avatar lostmygithubaccount commented on May 27, 2024

are there any workarounds to read from public blobs currently? trying to read from Azure open datasets hosted on a public blob

from adlfs.

lostmygithubaccount avatar lostmygithubaccount commented on May 27, 2024

will this be published to pypi soon @hayesgb ?

from adlfs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.