Azure Data Factory如何通过Select活动选取嵌套对象中的属性
Azure Data Factory Select活动嵌套字段选取报错解决方案
问题场景
- 数据源为嵌套对象结构:
{"CorrelationId":123,"ComponentInfo":{"ComponentId":"1","ComponentName":"testC"}} - 使用Select活动选取
CorrelationId与ComponentInfo.ComponentName时,原配置source1@{source1@ComponentInfo}.ComponentName触发报错:Column source1@ComponentInfo not found. The stream is either not connected or column is unavailable - 尝试过Flatten操作,但数据非数组结构,该操作不适用
解决方案
嵌套字段的引用无需额外用数据源别名包裹,直接采用数据源别名.嵌套对象.子字段的格式:
- 选取
CorrelationId:直接选择source1.CorrelationId - 选取
ComponentName:配置为source1.ComponentInfo.ComponentName
验证步骤
- 完成配置后,点击数据预览,确认嵌套字段值是否正常加载
- 若仍报错,检查Join活动的输出数据流,确认
ComponentInfo字段确实存在且连接正常
内容的提问来源于stack exchange,提问作者enavuio
相关产品推荐
相关产品推荐

