Created
March 9, 2020 21:26
-
-
Save aeshirey/315d4931d824df46986f8245045aec86 to your computer and use it in GitHub Desktop.
Code to read an adl:// file in Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import fsspec | |
filename = 'adl://path/to/file.csv' | |
adl_auth = { | |
'tenant_id': "<tenant_id>", | |
'client_id': "<client_id>", | |
'client_secret': "PGNsaWVudF9zZWNyZXQ+" | |
} | |
fs_file = fsspec.open(filename, **adl_auth) | |
with fs_file.open() as fh: | |
for line in fh: | |
print(line) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment