我无法安装 ADLS Gen2。请协助
I am unable to mount ADLS Gen2. Please assist
安装 ADLS Gen2 的代码:
安装 ADLS Gen2 时出错:
From the error message it clear says - the provided tenant is not found in your subscription. Please make sure the tenant ID is available in your subscription.
先决条件:
创建并授予服务主体权限如果您选择的访问方法需要具有足够权限的服务主体,而您没有,请执行以下步骤:
步骤 1: 创建可以访问资源的 Azure AD 应用程序和服务主体。请注意以下属性:
- application-id:唯一标识应用程序的 ID。
- directory-id:唯一标识 Azure AD 实例的 ID。
- service-credential:应用程序用来证明其身份的字符串。
- 存储帐户名称:存储帐户的名称。
- filesystem-name:文件系统的名称。
第 2 步: 注册服务主体,在 Azure Data Lake Storage Gen2 帐户上授予 correct role assignment,例如 Storage Blob Data Contributor
角色。
第 3 步: Azure Data Lake Gen2 通过直接传递值进行挂载。
configs = {"fs.azure.account.auth.type": "OAuth",
"fs.azure.account.oauth.provider.type": "org.apache.hadoop.fs.azurebfs.oauth2.ClientCredsTokenProvider",
"fs.azure.account.oauth2.client.id": "06ecxx-xxxxx-xxxx-xxx-xxxef", #Enter <appId> = Application ID
"fs.azure.account.oauth2.client.secret": "1i_7Q-XXXXXXXXXXXXXXXXXXgyC.Szg", #Enter <password> = Client Secret created in AAD
"fs.azure.account.oauth2.client.endpoint": "https://login.microsoftonline.com/72f98-xxxx-xxxx-xxx-xx47/oauth2/token", #Enter <tenant> = Tenant ID
"fs.azure.createRemoteFileSystemDuringInitialization": "true"}
dbutils.fs.mount(
source = "abfss://<filesystem>@<StorageName>.dfs.core.windows.net/<Directory>", #Enter <container-name> = filesystem name <storage-account-name> = storage name
mount_point = "/mnt/<mountname>",
extra_configs = configs)
安装 ADLS Gen2 的代码:
安装 ADLS Gen2 时出错:
From the error message it clear says - the provided tenant is not found in your subscription. Please make sure the tenant ID is available in your subscription.
先决条件:
创建并授予服务主体权限如果您选择的访问方法需要具有足够权限的服务主体,而您没有,请执行以下步骤:
步骤 1: 创建可以访问资源的 Azure AD 应用程序和服务主体。请注意以下属性:
- application-id:唯一标识应用程序的 ID。
- directory-id:唯一标识 Azure AD 实例的 ID。
- service-credential:应用程序用来证明其身份的字符串。
- 存储帐户名称:存储帐户的名称。
- filesystem-name:文件系统的名称。
第 2 步: 注册服务主体,在 Azure Data Lake Storage Gen2 帐户上授予 correct role assignment,例如 Storage Blob Data Contributor
角色。
第 3 步: Azure Data Lake Gen2 通过直接传递值进行挂载。
configs = {"fs.azure.account.auth.type": "OAuth",
"fs.azure.account.oauth.provider.type": "org.apache.hadoop.fs.azurebfs.oauth2.ClientCredsTokenProvider",
"fs.azure.account.oauth2.client.id": "06ecxx-xxxxx-xxxx-xxx-xxxef", #Enter <appId> = Application ID
"fs.azure.account.oauth2.client.secret": "1i_7Q-XXXXXXXXXXXXXXXXXXgyC.Szg", #Enter <password> = Client Secret created in AAD
"fs.azure.account.oauth2.client.endpoint": "https://login.microsoftonline.com/72f98-xxxx-xxxx-xxx-xx47/oauth2/token", #Enter <tenant> = Tenant ID
"fs.azure.createRemoteFileSystemDuringInitialization": "true"}
dbutils.fs.mount(
source = "abfss://<filesystem>@<StorageName>.dfs.core.windows.net/<Directory>", #Enter <container-name> = filesystem name <storage-account-name> = storage name
mount_point = "/mnt/<mountname>",
extra_configs = configs)