-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Stream Analytics] Add Subscription Level APIs (#13322)
* add query testing apis * add operationId and outputURI * fix some linter errors * fix model validation * address some PR comments * address some comments * delete getoperationresults example * try adding raw input datasource wrappers * add inputs * refactor input structure * add outputs * modify some descriptions * address more comments * add 200 response * fix formatting * Delete package-lock.json * restore package-lock.json * address final comments * add compile query * add sample input api * add test input and test output apis * fix validation errors * update testQuery and compileQuery * update sample input and test input/output * final fixes * fix linter errors pt1 * fix small bugs * remove duplicate operations def Co-authored-by: Roslyn Lu <roslu@microsoft.com>
- Loading branch information
Showing
13 changed files
with
1,378 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
...rosoft.StreamAnalytics/preview/2017-04-01-preview/examples/Subscription_CompileQuery.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2017-04-01-preview", | ||
"subscriptionId": "56b5e0a9-b645-407d-99b0-c64f86013e3d", | ||
"location": "West US", | ||
"compileQuery": { | ||
"query": "SELECT\r\n *\r\nINTO\r\n [output1]\r\nFROM\r\n [input1]", | ||
"inputs": [ | ||
{ | ||
"name": "input1", | ||
"type": "Stream" | ||
} | ||
], | ||
"functions": [ | ||
{ | ||
"name": "function1", | ||
"type": "Scalar", | ||
"bindingType": "Microsoft.StreamAnalytics/JavascriptUdf", | ||
"inputs": [ | ||
{ | ||
"dataType": "any", | ||
"isConfigurationParameter": null | ||
} | ||
], | ||
"output": { | ||
"dataType": "bigint" | ||
} | ||
} | ||
], | ||
"jobType": "Cloud", | ||
"compatibilityLevel": "1.2" | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"errors": [ | ||
{ | ||
"message": "Query failed to compile.", | ||
"isGlobal": true | ||
} | ||
], | ||
"inputs": [ | ||
"inputtest" | ||
], | ||
"outputs": [ | ||
"outputtest" | ||
], | ||
"functions": [ | ||
"transformationtest" | ||
] | ||
} | ||
} | ||
} | ||
} |
52 changes: 52 additions & 0 deletions
52
...crosoft.StreamAnalytics/preview/2017-04-01-preview/examples/Subscription_SampleInput.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2017-04-01-preview", | ||
"subscriptionId": "56b5e0a9-b645-407d-99b0-c64f86013e3d", | ||
"location": "West US", | ||
"sampleInput": { | ||
"input": { | ||
"properties": { | ||
"type": "Stream", | ||
"datasource": { | ||
"type": "Microsoft.Storage/Blob", | ||
"properties": { | ||
"storageAccounts": [ | ||
{ | ||
"accountName": "someAccountName", | ||
"accountKey": "someAccountKey==" | ||
} | ||
], | ||
"container": "state", | ||
"pathPattern": "{date}/{time}", | ||
"dateFormat": "yyyy/MM/dd", | ||
"timeFormat": "HH", | ||
"sourcePartitionCount": 16 | ||
} | ||
}, | ||
"serialization": { | ||
"type": "Csv", | ||
"properties": { | ||
"fieldDelimiter": ",", | ||
"encoding": "UTF8" | ||
} | ||
} | ||
} | ||
}, | ||
"compatibilityLevel": "1.2", | ||
"eventsUri": "http://myoutput.com", | ||
"dataLocale": "en-US" | ||
} | ||
}, | ||
"responses": { | ||
"202": { | ||
"body": { | ||
"status": "ReadAllEventsInRange", | ||
"diagnostics": [ | ||
"" | ||
], | ||
"eventsDownloadUrl": "http://myoutput.com", | ||
"lastArrivalTime": "2020-12-05T14:35:00Z" | ||
} | ||
} | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
...Microsoft.StreamAnalytics/preview/2017-04-01-preview/examples/Subscription_TestInput.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2017-04-01-preview", | ||
"subscriptionId": "56b5e0a9-b645-407d-99b0-c64f86013e3d", | ||
"location": "West US", | ||
"testInput": { | ||
"input": { | ||
"properties": { | ||
"type": "Stream", | ||
"datasource": { | ||
"type": "Microsoft.Storage/Blob", | ||
"properties": { | ||
"storageAccounts": [ | ||
{ | ||
"accountName": "someAccountName", | ||
"accountKey": "someAccountKey==" | ||
} | ||
], | ||
"container": "state", | ||
"pathPattern": "{date}/{time}", | ||
"dateFormat": "yyyy/MM/dd", | ||
"timeFormat": "HH", | ||
"sourcePartitionCount": 16 | ||
} | ||
}, | ||
"serialization": { | ||
"type": "Csv", | ||
"properties": { | ||
"fieldDelimiter": ",", | ||
"encoding": "UTF8" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"202": { | ||
"body": { | ||
"status": "TestSuceeded" | ||
} | ||
} | ||
} | ||
} |
42 changes: 42 additions & 0 deletions
42
...icrosoft.StreamAnalytics/preview/2017-04-01-preview/examples/Subscription_TestOutput.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2017-04-01-preview", | ||
"subscriptionId": "56b5e0a9-b645-407d-99b0-c64f86013e3d", | ||
"location": "West US", | ||
"testOutput": { | ||
"output": { | ||
"properties": { | ||
"datasource": { | ||
"type": "Microsoft.Storage/Blob", | ||
"properties": { | ||
"storageAccounts": [ | ||
{ | ||
"accountName": "someAccountName", | ||
"accountKey": "accountKey==" | ||
} | ||
], | ||
"container": "state", | ||
"pathPattern": "{date}/{time}", | ||
"dateFormat": "yyyy/MM/dd", | ||
"timeFormat": "HH" | ||
} | ||
}, | ||
"serialization": { | ||
"type": "Csv", | ||
"properties": { | ||
"fieldDelimiter": ",", | ||
"encoding": "UTF8" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"202": { | ||
"body": { | ||
"status": "TestSuceeded" | ||
} | ||
} | ||
} | ||
} |
85 changes: 85 additions & 0 deletions
85
...Microsoft.StreamAnalytics/preview/2017-04-01-preview/examples/Subscription_TestQuery.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2017-04-01-preview", | ||
"subscriptionId": "56b5e0a9-b645-407d-99b0-c64f86013e3d", | ||
"location": "West US", | ||
"testQuery": { | ||
"diagnostics": { | ||
"writeUri": "http://myoutput.com", | ||
"path": "/pathto/subdirectory" | ||
}, | ||
"streamingJob": { | ||
"properties": { | ||
"sku": { | ||
"name": "Standard" | ||
}, | ||
"eventsOutOfOrderPolicy": "Drop", | ||
"outputErrorPolicy": "Drop", | ||
"eventsOutOfOrderMaxDelayInSeconds": 0, | ||
"eventsLateArrivalMaxDelayInSeconds": 5, | ||
"dataLocale": "en-US", | ||
"compatibilityLevel": "1.0", | ||
"inputs": [ | ||
{ | ||
"properties": { | ||
"type": "Stream", | ||
"datasource": { | ||
"type": "Raw", | ||
"properties": { | ||
"payloadUri": "http://myinput.com" | ||
} | ||
}, | ||
"serialization": { | ||
"type": "Json", | ||
"properties": { | ||
"encoding": "UTF8" | ||
} | ||
} | ||
}, | ||
"name": "inputtest" | ||
} | ||
], | ||
"transformation": { | ||
"properties": { | ||
"streamingUnits": 1, | ||
"query": "Select Id, Name from inputtest" | ||
}, | ||
"name": "transformationtest" | ||
}, | ||
"outputs": [ | ||
{ | ||
"properties": { | ||
"datasource": { | ||
"type": "Raw", | ||
"properties": { | ||
"payloadUri": "http://myoutput.com" | ||
} | ||
}, | ||
"serialization": { | ||
"type": "Json" | ||
} | ||
}, | ||
"name": "outputtest" | ||
} | ||
], | ||
"functions": [] | ||
}, | ||
"location": "West US", | ||
"tags": { | ||
"key1": "value1", | ||
"randomKey": "randomValue", | ||
"key3": "value3" | ||
} | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"status": "Success", | ||
"outputUri": "http://myoutput.com" | ||
} | ||
}, | ||
"202": {} | ||
} | ||
} |
Oops, something went wrong.