小编Ken*_*y_I的帖子

写入 Delta 表时检测到架构不匹配 - Azure Databricks

我尝试将“small_radio_json.json”加载到 Delta Lake 表。在此代码之后我将创建表。

我尝试创建 Delta 表,但收到错误“写入 Delta 表时检测到架构不匹配”。可能与分区有关 events.write.format("delta").mode("overwrite").partitionBy("artist").save("/delta/events/")

如何修复或修改代码。

    //https://learn.microsoft.com/en-us/azure/azure-databricks/databricks-extract-load-sql-data-warehouse
    //https://learn.microsoft.com/en-us/azure/databricks/_static/notebooks/delta/quickstart-scala.html
    
    //Session configuration
    val appID = "123558b9-3525-4c62-8c48-d3d7e2c16a6a"
    val secret = "123[xEPjpOIBJtBS-W9B9Zsv7h9IF:qw"
    val tenantID = "12344839-0afa-4fae-a34a-326c42112bca"

    spark.conf.set("fs.azure.account.auth.type", "OAuth")
    spark.conf.set("fs.azure.account.oauth.provider.type", 
    "org.apache.hadoop.fs.azurebfs.oauth2.ClientCredsTokenProvider")
    spark.conf.set("fs.azure.account.oauth2.client.id", "<appID>")
    spark.conf.set("fs.azure.account.oauth2.client.secret", "<secret>")
   spark.conf.set("fs.azure.account.oauth2.client.endpoint", "https://login.microsoftonline.com/<tenant- 
   id>/oauth2/token")
   spark.conf.set("fs.azure.createRemoteFileSystemDuringInitialization", "true")

   //Account Information
    val storageAccountName = "mydatalake"
   val fileSystemName = "fileshare1"

    spark.conf.set("fs.azure.account.auth.type." + storageAccountName + ".dfs.core.windows.net", "OAuth")
    spark.conf.set("fs.azure.account.oauth.provider.type." + storageAccountName + 
    ".dfs.core.windows.net", "org.apache.hadoop.fs.azurebfs.oauth2.ClientCredsTokenProvider")
    spark.conf.set("fs.azure.account.oauth2.client.id." + storageAccountName + ".dfs.core.windows.net", 
    "" + appID + "")
    spark.conf.set("fs.azure.account.oauth2.client.secret." + storageAccountName + 
    ".dfs.core.windows.net", "" + secret …
Run Code Online (Sandbox Code Playgroud)

scala azure-databricks delta-lake

11
推荐指数
2
解决办法
4万
查看次数

带有 Azure DevOps 管道的 AzureFileCopy 失败 - 'AzCopy.exe 以非零退出退出

我尝试将 ARM 模板复制到存储,但失败了。YML 有什么问题?

错误:

& "AzCopy\AzCopy.exe" logout
INFO: Logout succeeded.
INFO: AzCopy.exe: A newer version 10.4.3 is available to download

Disconnect-AzAccount -Scope Process -ErrorAction Stop
Clear-AzContext -Scope Process -ErrorAction Stop
##[error]Upload to container: 'arm' in storage account: 'devopsstorageken' with blob prefix: 'test' 
failed with error: 'AzCopy.exe exited with non-zero exit code while uploading files to blob storage.' 
For more info please refer to https://aka.ms/azurefilecopyreadme
Finishing: AzureFileCopy
Run Code Online (Sandbox Code Playgroud)

YML:

- task: AzureFileCopy@4
  inputs:
    SourcePath: '$(Build.Repository.LocalPath)/ARMTemplates/CreateSQLServerARM'
    azureSubscription: 'TestRG-Conn'
    Destination: 'AzureBlob'
    storage: 'devopsstorageken' …
Run Code Online (Sandbox Code Playgroud)

azure-devops

7
推荐指数
1
解决办法
4877
查看次数

尝试创建 Azure SQL 逻辑服务器时 UpsertLogicalServerRequestAlreadyInProgress

我有 Azure DevOpe 管道,它工作得很好,但昨天我突然出现了 showstopper 错误。管道没有给出错误,但没有创建 SQL 逻辑服务器。我删除了资源组中的所有资源。然后我再次执行管道。我收到“正在进行的逻辑服务器请求已在进行中,请稍后重试您的请求”错误。我已经 24 小时无法创建逻辑服务器了。

我以为我可以从 Azure 门户取消部署,但我没有看到任何部署有错误。我能做什么?

Azure DevOps 上的错误:

C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NoProfile -NonInteractive - 
ExecutionPolicy Unrestricted -Command ". 'D:\a\_temp\43a1dcab-bbff-4fd8-8cc7-5773945858fa.ps1'"
Import-Module -Name C:\Modules\az_4.3.0\Az.Accounts\1.9.1\Az.Accounts.psd1 -Global
Clear-AzContext -Scope Process
Clear-AzContext -Scope CurrentUser -Force -ErrorAction SilentlyContinue
Connect-AzAccount -ServicePrincipal -Tenant *** -Credential System.Management.Automation.PSCredential 
-Environment AzureCloud @processScope
Set-AzContext -SubscriptionId 0000000000000000000 -TenantId ***
strtempdigiopsdev
##[error]9:15:12 AM - The deployment 'TemplateMasterDeployment' failed with error(s). Showing 2 out 
of 2 error(s).
Status Message: The resource operation completed with terminal provisioning state 'Failed'. …
Run Code Online (Sandbox Code Playgroud)

azure azure-resource-manager azure-devops azure-sql-server

7
推荐指数
1
解决办法
735
查看次数

可以使用 Terraform 配置 Azure Functions 的运行状况检查吗?

我有 Terraform 部署 Azure Functions。现在我想使用 Terraform 添加健康检查?如何启用它,添加网址和时间?

https://learn.microsoft.com/en-us/azure/app-service/monitor-instances-health-check

terraform azure-functions

7
推荐指数
1
解决办法
2915
查看次数

如何使用 Azure Functions 将数据发送到服务总线主题?

我这里有默认的基于 C# 的 HTTP 触发器,我希望将数据“Hello Name”发送到服务总线主题(已创建)。我在门户网站上编码。

如何做到服务总线输出绑定?

这是行不通的。任何可用的帮助?

- 缺少处理服务总线的参考?

- 如何定义服务总线的连接?Functions.json 在哪里

- 如何向服务总线发送消息?

//This FunctionApp get triggered by HTTP and send message to Azure Service Bus

using System;
using System.IO;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Extensions.Http;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;

namespace Company.Function

{
    public static class HttpTriggerCSharp1
{
    [FunctionName("HttpTriggerCSharp1")]
    [return: ServiceBus("myqueue", Connection = "ServiceBusConnection")] // I added this for SB Output. Where to define.

    public static async Task<IActionResult> Run(
        [HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = …
Run Code Online (Sandbox Code Playgroud)

.net c# azure azureservicebus azure-functions

5
推荐指数
1
解决办法
4788
查看次数

如何在 Azure DevOps Git 存储库的 README.MD 中创建内联链接?

我尝试通过将链接文本括在方括号 [ ] 中,然后将 URL 括在括号 ( ) 中来创建内联链接。

但是我没有完成链接。“预览”和“内容”显示完全相同。怎么了?

-开发工具Visual Studio Code

azure-devops

5
推荐指数
1
解决办法
4966
查看次数

如何在Azure门户中自行保留目录?

我想从 Azure 门户中保留未使用的目录。我只需要默认目录。有些目录已经3年没有使用了。

如何在没有另一个目录管理员帮助的情况下离开目录?

azure azure-active-directory

5
推荐指数
2
解决办法
2270
查看次数

向 Azure Open AI 发出 API 请求时不支持的数据类型

尝试向 Azure OpenAI 发送发布请求时收到“数据不受支持”错误。我应该怎么做才能修复该错误?

https://myopenai.openai.azure.com/openai/deployments/code-davinci-002/completions?api-version=2023-03-15-preview&API-KEY=xxxxxxxxxxxx&content-type=application/json

api-version = 2023-03-15-preview
API-KEY = xxxxx
content-type = application/json


{
     "model": "gpt-3.5-turbo",
     "messages": [{"role": "user", "content": "Say this is a test!"}],
     "temperature": 0.7
}
Run Code Online (Sandbox Code Playgroud)

azure azure-openai

4
推荐指数
1
解决办法
5391
查看次数

无法解析属性“CosmosDBAttribute.ConnectionStringSetting”的值

我使用 Visual Studio 开发了带有 CosmosDB 输出的简单服务总线触发器。Service Bus 和 CosmosDB 的连接字符串在 local.settings.json 中定义。代码在本地完全发挥作用。现在我有 Zip 发布函数(C#)到 Azure。

我收到错误:

Microsoft.Azure.WebJobs.Host: Error indexing method 'Function1'. 
Microsoft.Azure.WebJobs.Host: Unable to resolve the value for property 
'CosmosDBAttribute.ConnectionStringSetting'. 
Run Code Online (Sandbox Code Playgroud)

我该怎么办?

在此处输入图片说明

c# azure azure-functions

3
推荐指数
1
解决办法
2782
查看次数

Azure DevOps 管道错误:不允许更新租户 ID、应用程序 ID、主体 ID 和范围

我尝试在 Azure DevOps 上使用 ARM 创建 SQL Server。管道成功地为 Azure 门户创建了 SQL Server 资源,但我在 Azure DevOps 中遇到了奇怪的错误。为什么会发生这种情况以及如何解决?

错误:

There were errors in your deployment. Error code: DeploymentFailed.
##[error]RoleAssignmentUpdateNotPermitted: Tenant ID, application ID, principal ID, and scope are not 
allowed to be updated.
##[error]Check out the troubleshooting guide to see if your issue is addressed: 
https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/deploy/azure-resource-group-deployment? 
view=azure-devops#troubleshooting
##[error]Task failed while creating or updating the template deployment.
Run Code Online (Sandbox Code Playgroud)

YML:

task: AzureResourceManagerTemplateDeployment@3
  inputs:
    deploymentScope: 'Resource Group'
    azureResourceManagerConnection: 'TestRG-Conn'
    subscriptionId: '1111753a-501e-4e46-9aff-6120ed561111'
    action: 'Create Or Update Resource …
Run Code Online (Sandbox Code Playgroud)

azure-devops

3
推荐指数
2
解决办法
2364
查看次数