@Richard Guo :
The error message suggests that the container specified in the cloud_files function and the container specified in the fs.azure configuration settings are different. In the cloud_files function, you are using my_container while in the configuration settings you are using my_container@my_storageaccount.dfs.core.windows.net.
To fix the issue, you need to ensure that the container name used in both places matches exactly. You can try modifying the cloud_files function to use the full container path as follows:
CREATE OR REFRESH STREAMING LIVE TABLE test_account_raw
AS SELECT * FROM cloud_files(
"abfss://my_storageaccount.dfs.core.windows.net/my_container/test_csv/",
"csv",
map("header", "true"));
Then, make sure that the fs.azure configuration settings use the same container path:
"configuration": {
"fs.azure.account.auth.type.my_storageaccount.dfs.core.windows.net": "OAuth",
"fs.azure.account.oauth.provider.type.my_storageaccount.dfs.core.windows.net": "org.apache.hadoop.fs.azurebfs.oauth2.ClientCredsTokenProvider",
"fs.azure.account.oauth2.client.id.my_storageaccount.dfs.core.windows.net": "my_client_id",
"fs.azure.account.oauth2.client.secret.my_storageaccount.dfs.core.windows.net": "my_secret",
"fs.azure.account.oauth2.client.endpoint.my_storageaccount.dfs.core.windows.net": "https://login.microsoftonline.com/my_tenant_id/oauth2/token",
"fs.azure.createRemoteFileSystemDuringInitialization": "true",
"fs.abfss.my_container@my_storageaccount.dfs.core.windows.net.tokenProviderType": "org.apache.hadoop.fs.azurebfs.oauth2.ClientCredsTokenProvider",
"fs.abfss.my_container@my_storageaccount.dfs.core.windows.net.oauth.provider.type": "org.apache.hadoop.fs.azurebfs.oauth2.ClientCredsTokenProvider",
"fs.abfss.my_container@my_storageaccount.dfs.core.windows.net.oauth2.client.id": "my_client_id",
"fs.abfss.my_container@my_storageaccount.dfs.core.windows.net.oauth2.client.secret": "my_secret",
"fs.abfss.my_container@my_storageaccount.dfs.core.windows.net.oauth2.client.endpoint": "https://login.microsoftonline.com/my_tenant_id/oauth2/token"
}
Note that in the fs.azure configuration settings, the fs.abfss prefix is used instead of fs.azure.account. This is because we are using the ABFS driver to access ADLS.