benmatwil commented on issue #49972:
URL: https://github.com/apache/arrow/issues/49972#issuecomment-4804027717
This is with pyarrow 24.0.0
Example of running in the terminal, I get the following:
From the error you can see the format of the url it looks to have created.
```
In [1]: from pyarrow import fs, parquet as pq
In [2]: afs = fs.AzureFileSystem(account_name="staccount1",
sas_token="saskey")
In [3]: pq.ParquetFile("path/to/file.parquet", filesystem=afs)
---------------------------------------------------------------------------
OSError Traceback (most recent call last)
Cell In[23], line 1
----> 1 pq.ParquetFile("path/to/file.parquet", filesystem=afs)
File ~\venvs\base310\lib\site-packages\pyarrow\parquet\core.py:324, in
ParquetFile.__init__(self, source, metadata, common_metadata, read_dictionary,
binary_type, list_type, memory_map, buffer_size, pre_buffer,
coerce_int96_timestamp_unit, decryption_properties, thrift_string_size_limit,
thrift_container_size_limit, filesystem, page_checksum_verification,
arrow_extensions_enabled)
321 filesystem, source = _resolve_filesystem_and_path(
322 source, filesystem, memory_map=memory_map)
323 if filesystem is not None:
--> 324 source = filesystem.open_input_file(source)
325 self._close_source = True # We opened it here, ensure we close
it.
327 self.reader = ParquetReader()
File ~\venvs\base310\lib\site-packages\pyarrow\_fs.pyx:815, in
pyarrow._fs.FileSystem.open_input_file()
File ~\venvs\base310\lib\site-packages\pyarrow\error.pxi:155, in
pyarrow.lib.pyarrow_internal_check_status()
File ~\venvs\base310\lib\site-packages\pyarrow\error.pxi:92, in
pyarrow.lib.check_status()
OSError: GetProperties failed for
'https://staccount1.blob.core.windows.net/saskey/path/to/file.parquet'. Cannot
initialise an ObjectInputFile without knowing the file size. Azure Error:
[NoAuthenticationInformation] 401 Server failed to authenticate the request.
Please refer to the information in the www-authenticate header.
Request ID: 437f340c-901e-004a-5be3-042a13000000
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]