azure-stream-analytics

iterate nested list in json msg by cql stream analytics

不羁岁月 提交于 2020-05-14 12:13:20
问题 I have a json msg coming from iotHub like: { "deviceId": "abc", "topic": "data", "data": { "varname1": [{ "t": "timestamp1", "v": "value1", "f": "respondFrame1" }, { "t": "timestamp2", "v": "value2", "f": "respondFrame2" }], "varname2": [{ "t": "timestamp1", "v": "value1", "f": "respondFrame1" }, { "t": "timestamp2", "v": "value2", "f": "respondFrame2" }] } } and want to store this by azure stream analytics job into a transact sql like this: ID | deviceId | varname | timestamp | respondFrame

iterate nested list in json msg by cql stream analytics

僤鯓⒐⒋嵵緔 提交于 2020-05-14 12:10:27
问题 I have a json msg coming from iotHub like: { "deviceId": "abc", "topic": "data", "data": { "varname1": [{ "t": "timestamp1", "v": "value1", "f": "respondFrame1" }, { "t": "timestamp2", "v": "value2", "f": "respondFrame2" }], "varname2": [{ "t": "timestamp1", "v": "value1", "f": "respondFrame1" }, { "t": "timestamp2", "v": "value2", "f": "respondFrame2" }] } } and want to store this by azure stream analytics job into a transact sql like this: ID | deviceId | varname | timestamp | respondFrame

How can I set Stream Analytics Output as Stored Procedure

寵の児 提交于 2020-02-08 02:31:31
问题 How can I add Stored Procedure as Analytics Output More simply how can I send my analytics result to sp parameter 回答1: how can I send my analytics result to sp parameter If you’d like to pass Stream Analytics jobs result to a Stored Procedure in SQL Database, it seems that there are no direct way to pass analytics result to Stored Procedure and execute the Stored Procedure. Stream Analytics jobs could write result to an existing table in an Azure SQL Database, you could try to create a

How to find Duplicate documents in Cosmos DB

元气小坏坏 提交于 2020-01-25 04:19:12
问题 I have seen like a huge amount of data write to cosmos DB from stream analytics job on a particular day. It was not supposed to write huge amount of documents in a day. I have to check if there is duplication of documents on that particular day. Is there any query/any way to find out duplicate records in cosmos DB? 回答1: Is there any query/any way to find out duplicate records in cosmos DB? Quick answer is YES.Please use distinct keyword in the cosmos db query sql.And filter the _ts (System

Asset Tracking with Azure Stream Analytics

五迷三道 提交于 2020-01-17 05:32:07
问题 I have an event Hub and a stream analytics job sending data to Power BI. I was wondering what would be the best way to configure the event hub / for asset tracking? e.g I have multiple clients sending to the event hub -> stream analytic job and I want to be able to determine if a client with a particular ID goes offline? Cheers! 回答1: If the list of IDs is relatively static, then you can use reference data join to output all IDs that are missing in each time window. If you want to infer the

How to update values in cosmosdb as output using azure stream analutics?

别说谁变了你拦得住时间么 提交于 2020-01-16 08:38:28
问题 at first event I get data like below { 'product_name':'hamam', 'quantity':'100' } at second I get data like below { 'product_name':'hamam', 'quantity':'70' } here I wanna update the values in cosmos db, how can I do it? 回答1: ASA supports upserts feature for cosmos db if your data contains a unique document id.(Your sample data seems does not have it) Please see this paragraph about upserts in ASA for cosmos db. Some excerpt as below: Stream Analytics integration with Azure Cosmos DB allows

Authorization failure when creating a Stream Analytics job

谁都会走 提交于 2020-01-13 22:42:39
问题 I've been trying (and failing) to create an Azure Stream Analytics job programatically. I was following this example originally: https://azure.microsoft.com/en-gb/documentation/articles/stream-analytics-dotnet-management-sdk/ But it pops up a dialog for you to log in. I want to be able to do this server side. It looks like I need to use Azure AD to use the Resource Manager APIs. I've been working my way through this: https://msdn.microsoft.com/en-us/library/azure/dn790557.aspx#bk_portal And

Authorization failure when creating a Stream Analytics job

独自空忆成欢 提交于 2020-01-13 22:41:47
问题 I've been trying (and failing) to create an Azure Stream Analytics job programatically. I was following this example originally: https://azure.microsoft.com/en-gb/documentation/articles/stream-analytics-dotnet-management-sdk/ But it pops up a dialog for you to log in. I want to be able to do this server side. It looks like I need to use Azure AD to use the Resource Manager APIs. I've been working my way through this: https://msdn.microsoft.com/en-us/library/azure/dn790557.aspx#bk_portal And

using split in azure stream analytics

坚强是说给别人听的谎言 提交于 2020-01-07 09:03:49
问题 I have strings in the format "1234.567.111". I wish to break it into three int. I do not see a split function in azure stream analytics. Is it possible to do this any other way. Thanks Update: I have added a request for split function here.., would appreciate if you guys voted for the same.. 回答1: I wish Stream Analytics had a split function. You may have to use CHARINDEX and SUBSTRING for now: https://msdn.microsoft.com/en-us/library/azure/dn835064.aspx It's a bit of a pain, but the following