Can't Migrate Auto Loader To File Events

mjtd
New Contributor III

Hi there,

I am trying to migrate my auto loader job to use file events, but it's failing with this error:
com.databricks.sql.util.UnexpectedHttpStatus: Failed to list objects. There are problems on the location that need to be resolved. Details: Failed to provision file events resources during queue.create operation.

Here are the roles I have assigned to the Databricks Access Connector in Azure:

  1. EventGrid Contributor at the resource group level.
  2. EventGrid Data Contributor at the resource group level.
  3. EventGrid EventSubscription Contributor at the resource group level.
  4. Storage Account Contributor at the storage account level.
  5. Storage Blob Data Contributor at the storage account level.
  6. Storage Queue Data Contributor at the storage account level.

I have tried recreating the external location from scratch.

Here's my code:

spark.readStream.format("cloudFiles")
.option("cloudFiles.format", "json")
.option("cloudFiles.useManagedFileEvents", True)
.option("cloudFiles.schemaLocation", SCHEMA_PATH)
.option("cloudFiles.inferColumnTypes", True)
.option("cloudFiles.schemaEvolutionMode", "addNewColumns")
.load(INPUT_FILES_PATH)

Thank you for taking the time to read my question!