我正在开发一个代码来从Azure Key Vault Secret中读取数据。我需要在SSIS脚本任务中拥有代码。我在C#独立应用程序中有一个工作代码,它无缝地工作但在SSIS脚本任务中失败。
下面是我在VB.NET中的代码(在C#中尝试过相同的代码)
SELECT t.col1, t.col2, t2.rank
FROM myTable t JOIN (
SELECT MIN(col1) minCol1, col2, ROW_NUMBER() OVER (ORDER BY MIN(col1)) rank
FROM myTable
GROUP BY col2
) t2 ON t.col2 = t2.col2
ORDER BY t.col1
Public Shared Async Function GetToken(ByVal authority As String,ByVal resource As String,ByVal scope As String)As Task(Of String)
Dim kvc As KeyVaultClient = New KeyVaultClient(New KeyVaultClient.AuthenticationCallback(Function(authority, resource, scope) GetToken(authority, resource, scope)))
上面转换为C#的代码在独立的C#程序中运行得很好,但在SSIS Script任务中实现时会抛出错误。 它抛出了一般错误,并且不允许我调试。