diff --git a/assets/model_monitoring/components/src/shared_utilities/io_utils.py b/assets/model_monitoring/components/src/shared_utilities/io_utils.py index e330e6e8d1..5927b5406b 100644 --- a/assets/model_monitoring/components/src/shared_utilities/io_utils.py +++ b/assets/model_monitoring/components/src/shared_utilities/io_utils.py @@ -145,6 +145,10 @@ def read_mltable_in_spark(mltable_path: str): """Read mltable in spark.""" if mltable_path is None: raise InvalidInputError("MLTable path is None.") + # validate if we can access the mltable, e.g. if env. is ready to access credential-less data + store_url = StoreUrl(mltable_path) + store_url.get_credential(True) # will raise exception if not able to access + spark = init_spark() try: return spark.read.mltable(mltable_path)