[英]Azure cosmos db error in data factory - data flow sink -> job failed due to reason: Conversion from StructType
I'm building a simple data flow
in azure data factory to get some specific data from a content hub location.我正在天蓝色数据工厂中构建一个简单的
data flow
,以从内容中心位置获取一些特定数据。 This information is in json format.此信息为 json 格式。
Transformations:转换:
rest API
get method to retrieve the data from the URLrest API
get 方法从 URL 中检索数据flatten
to put into rows an item list that contains all the articles.flatten
以将包含所有文章的项目列表放入行中。select
to chose specific attributes from each items in the list.select
以从列表中的每个项目中选择特定属性。alter row
to upsert
data if condition true()
true()
,则更alter row
以upsert
数据 The problem is with the last item elements
since this is a StructType
{}
:问题在于最后一项
elements
,因为这是StructType
{}
:
elements: {
headline: {
title: "Title",
dataType: "string",
name: "headline",
variations: { },
multiValue: false,
:type: "string",
},
alternativeHeadline: {
title: "Subtitle",
dataType: "string",
name: "alternativeHeadline",
variations: { },
multiValue: false,
:type: "string",
},
author: {
title: "Author",
dataType: "string",
name: "author",
variations: { },
multiValue: false,
:type: "string",
},
...
}
When I run the job I'm getting this error:当我运行作业时,我收到此错误:
{"StatusCode":"DFExecutorUserError","Message":"Job failed due to reason: Conversion from StructType(StructField(headline,StructType(StructField(:type,StringType,true), StructField(dataType,StringType,true), StructField(multiValue,BooleanType,true), StructField(name,StringType,true), StructField(title,StringType,true), StructField(value,StringType,true), StructField(variations,StructType(StructField(mobile,StructType(StructField(:type,StringType,true), StructField(dataType,StringType,true), StructField(multiValue,BooleanType,true), StructField(name,StringType,true), StructField(title,StringType,true), StructField(value,StringType,true)),true), StructField(spanish,StructType(StructField(:type,StringType,true), StructField(dataType,StringType,true), StructField(multiValue,BooleanType,true), StructField(name,StringType,true), StructField(title,StringType,true), StructField(value,StringType,true)),true)),true)),true), StructField(icon,StructType(StructField(:type,StringType,true), StructField(dataType,StringType,true), StructField(multiValue,BooleanType,true),","Details":""}
It seems one ore more data struct types are wrong from the source vs the target but I would like this to be dynamic.从源到目标,似乎一个或多个数据结构类型是错误的,但我希望这是动态的。 Since it is some metadata, the attribute can or can't be there.
由于它是一些元数据,因此该属性可以存在或不存在。
I tried using a copy activity
directly in a pipeline using the same dataset and it worked fine the problem is I'll need to transform the data later and the copy activity is limited in this aspect.我尝试使用相同的数据集直接在管道中使用
copy activity
,它运行良好,问题是我稍后需要转换数据,并且复制活动在这方面受到限制。 Any thoughts?有什么想法吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.