我是第一次使用 Azure 数据工厂。
我有一个源数据集的查找,该数据集是来自 azure 表存储的表
我有一个笔记本,其中有一个名为“input”的基本参数,其值为:
@activity('Lookup1').output
笔记本路径指的是一个尚未执行任何操作的 python 脚本。
当我尝试调试管道时,出现错误:
{
"errorCode": "2105",
"message": "The value type 'System.Collections.Generic.Dictionary`2[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=xxx],[System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=xxx]]', in key 'input' is not expected type 'System.String'",
"failureType": "UserError",
"target": "Notebook1"
}
我希望能够在 python 脚本中使用 json 对象。我是否必须以某种方式更改基本参数才能序列化对象?
最佳答案
您可以使用@string将其转换为字符串: https://learn.microsoft.com/nl-nl/azure/data-factory/control-flow-expression-language-functions#conversion-functions
这应该有效:@string(activity('Lookup1').output)
这会将对象转换为 json 字符串,您可以在笔记本中解析它。
关于azure - 如何将对象从 azure 数据工厂查找传递到笔记本,以便我可以在 python 脚本中使用 object/json,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55938410/