Azure Stream Analytics is not feeding DocumentDB output sink

老子叫甜甜 提交于 2019-12-11 08:00:52

问题


I am trying to integrate Azure Stream Analytics with DocumentDB and use it as a output sink. Problem is, that there are no documents created in DocDB when the processing job is running. I tried to test my query and I have even tried to mirror the output to storage account. There is json file being created in the storage containing all the values, but DocDB stays empty.

Here is my query:

WITH Res1 AS ( SELECT id,
    concat(
    cast( datepart(yyyy,timestamp) as nvarchar(max)),
    '-',
    cast( datepart(mm,timestamp) as nvarchar(max)),
    '-',
    cast( datepart(dd,timestamp) as nvarchar(max))) date, temp, humidity, distance, timestamp
FROM
    iothub Timestamp By timestamp)

Select *  into docdboutput FROM Res1
Select *  into test FROM Res1

I did set the documentDB output correctly to existing collection. I also tried to provide and not to provide document id parameter and neither of the options was working. I have used date field as a partition key when creating DocDB database and collection.

I did try also manual document upload. I have copied line from the created json file in storage account. I created separate json file containing this one record and uploaded it manually to DocumentDB collection via portal. It succeeded. Here is example of one line that was output to storage file:

{"id":"8ace6228-a2e1-434d-a5f3-c2c2f15da309","date":"2017-2-10","temp":21.0,"humidity":20.0,"distance":0,"timestamp":"2017-02-10T20:47:54.3716407Z"}

Please can anyone advice me, if there is some problem with my query, or navigate me how can I investigate and diagnose further.


回答1:


Are you by any chance using a collection which has <=10K RUs, and has a partition key defined in DocDb (aka Single Partition Collection) ?

There is an ongoing defect that is blocking output to Single partitioned collections. This should be fixed by end of next week. Your workarounds at this point are try using a different collection -- a) with >10K RUs (with partition key defined in DocDB) b) with <=10K RUs (with no partition key defined in DocDB/ASA)

Hope that helps!



来源:https://stackoverflow.com/questions/42168652/azure-stream-analytics-is-not-feeding-documentdb-output-sink

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!