我正在尝试使用服务主体从 Databricks 连接到 Synapse。我已经在集群配置中配置了服务主体
fs.azure.account.auth.type.<datalake>.dfs.core.windows.net OAuth
fs.azure.account.oauth.provider.type org.apache.hadoop.fs.azurebfs.oauth2.ClientCredsTokenProvider
fs.azure.account.oauth2.client.id <Service Principal ID/Application ID>
fs.azure.account.oauth2.client.secret <Client secret key/Service Principal Password>
fs.azure.account.oauth2.client.endpoint https://login.microsoftonline.com/<tenant-id>/oauth2/token
fs.azure.createRemoteFileSystemDuringInitialization true
Run Code Online (Sandbox Code Playgroud)
虽然我可以成功连接到 DataLake 并工作,但当我使用以下命令时,我无法写入突触......
DummyDF.write.format("com.databricks.spark.sqldw")\
.mode("append")\
.option("url", jdbcUrl)\
.option("useAzureMSI", "true")\
.option("tempDir",tempdir)\
.option("dbTable", "DummyTable").save()
Run Code Online (Sandbox Code Playgroud)
我收到以下错误...
Py4JJavaError: An error occurred while calling o831.save.
: com.databricks.spark.sqldw.SqlDWSideException: SQL DW failed to execute the JDBC query produced by the connector.
Underlying SQLException(s):
com.microsoft.sqlserver.jdbc.SQLServerException: External file access failed due to internal error: 'Error occurred while accessing HDFS: Java exception raised on call to HdfsBridge_IsDirExist. …Run Code Online (Sandbox Code Playgroud) 我有以下字符串:\n[Example] \xc3\xb6\xc3\xa4\xc3\xbc\xc3\x9f asdf 1234 (1a\xc3\xb6) (not necessary),
解释:
\n[Example] 可选,不需要
\xc3\xb6\xc3\xa4\xc3\xbc\xc3\x9f asdf 1234我需要的最重要的部分。每个字符、数字、特殊字符以及德语字符都\xc3\xa4\xc3\x84\xc3\xb6\xc3\x96\xc3\xbc\xc3\x9c\xc3\x9f可以在这里找到。
\n贪婪选择可能是防止像德国字符这样的字符的最佳解决方案,对吗?
(1a\xc3\xb6)可选和必需的
(not necessary)可选,不需要。如果出现的话可能是(not ...)或者(unusual)
,逗号也可以是可选的。但也不需要。
我使用以下正则表达式:/(?:\\[.*\\]\\s)?(?<name>.*?)(?:\\s\\([not|unusual].*?\\))?\\,/g
问题:
\n当我在逗号处使用可选参数时,?它将整个字符串拆分为单独的字符。
当我将组中的非贪婪选择更改name为贪婪选择时,可选逗号被分隔。但现在从 开始的示例字符串\xc3\xb6被选择到最后。
第一个标准括号内的字符串()可以以大写或小写开头。目前我只能识别大写字母。
这是我对 regex101 的尝试,其中包含一堆示例: https: //regex101.com/r/Lx2anw/1
\n很抱歉问了一个非常具体的问题,但我已经以我的知识结束了......
\n有人对我在这里可以做什么有什么建议吗?
\n我正在尝试在 DevOps 管道中使用替换函数,如https://learn.microsoft.com/en-us/azure/devops/pipelines/process/expressions?view=azure-devops#replace中所述
对于以下 yml,我期望输出为This Should be Steak but it is Steak,但实际输出为This Should be Steak but it is Beef
variables:
foo: 'beef'
bar: $[replace('$(foo)', 'beef', 'steak')]
pool:
vmImage: 'ubuntu-latest'
steps:
- script: echo This should be steak but it is $(bar)
Run Code Online (Sandbox Code Playgroud)
我也尝试过这会产生相同的输出
variables:
foo: 'beef'
pool:
vmImage: 'ubuntu-latest'
steps:
- script: echo This should be steak but it is ${{ replace('$(foo)', 'beef', 'steak') }}
Run Code Online (Sandbox Code Playgroud)