[英]Query from Azure Comos DB and save to Azure Table Storage using Data Factory
I want to save C._ts+C.ttl as one entity in my Azure Table Storage. 我想将C._ts + C.ttl保存为Azure表存储中的一个实体 。 I do the following query in my Copy Activity:
我在“复制活动”中执行以下查询:
"typeProperties": {
"source": {
"type": "DocumentDbCollectionSource",
"query": {
"value": "@concat('SELECT (C.ts+C.ttl) FROM C WHERE (C.ttl+C._ts)<= ', string(pipeline().parameters.bufferdays))",
"type": "Expression"
},
"nestingSeparator": "."
},
I dont want to copy all the fields from my source ie CosmosDB to my sink ie Table Storage. 我不希望所有的领域从我的来源即CosmosDB复制到我的水槽即表存储。 I just want to store the result of this query as one value .
我只想将此查询的结果存储为一个值 。 How can I do that?
我怎样才能做到这一点?
According to my test, I presume the null
value you queried because of that the collection level ttl
affects each document , but will not generate ttl
property within document. 根据我的测试,我假设您查询的
null
值是因为收集级别ttl
影响每个文档,但不会在文档内生成ttl
属性。
So when you execute SELECT c.ttl,c._ts FROM c
, just get below result. 因此,当您执行
SELECT c.ttl,c._ts FROM c
,只会得到以下结果。
Document level ttl
is not defined, just follow collection level ttl
. 未定义文档级别
ttl
,仅遵循集合级别ttl
。
You need to bulk add ttl property into per document so that you could transfer _ts+ttl
caculator results. 您需要将ttl属性批量添加到每个文档中,以便可以传输
_ts+ttl
caculator结果。
Your Copy Activity settings looks good , just add an alias in SQL, or set the name of the field via column mapping. 您的“复制活动”设置看起来不错,只需在SQL中添加别名,或通过列映射设置字段名称。
Hope it helps you. 希望对您有帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.