"with open" not working with Shared Access Cluster on mounted location

mathijs-fish
Databricks Partner

Hi All,

For an application that we are building, we need a encoding detector/utf-8 enforcer. For this, we used the python library chardet in combination with "with open". We open a file from a mounted adls location (we use a legacy hive-metastore)

When we were using Non Isolation Shared clusters, it was working fine, but because of security reasons, we have to change to Shared Access clusters. However, now the encoding detector is not working anymore.

This is how we detected encoding before:

mathijsfish_1-1701785425743.png

Error using shared access cluster:

mathijsfish_2-1701785466668.png

After some investigation we concluded that using with open, but also the os and glob module on mounted locations with a shared access cluster, does not work properly. Any idea how we can fix this?

For your reference, we have to use this mounted location, and a shared access cluster.