Skip to content

Commit 44184e5

Browse files
committed
Merge pull request #308 from Azure/dev
.
2 parents 84596b9 + 1fbae63 commit 44184e5

File tree

42 files changed

+6067
-3951
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+6067
-3951
lines changed

build.proj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@
219219
UnsignedFiles="@(DelaySignedAssembliesToSign)"
220220
DestinationPath="$(LibrarySourceFolder)\Package\$(Configuration)"
221221
BasePath="$(LibrarySourceFolder)\Package\$(Configuration)"
222-
Certificates="72, 10006"
222+
Certificates="72, 401"
223223
SigningLogPath="$(LibraryRoot)\signing.log"
224224
ToolsPath="$(CIToolsPath)"
225225
Condition="!$(DelaySign) and '@(DelaySignedAssembliesToSign)' != ''"/>
@@ -230,7 +230,7 @@
230230
UnsignedFiles="@(ScriptsToSign)"
231231
DestinationPath="$(LibrarySourceFolder)\Package\$(Configuration)"
232232
BasePath="$(LibrarySourceFolder)\Package\$(Configuration)"
233-
Certificates="10006"
233+
Certificates="402"
234234
SigningLogPath="$(LibraryRoot)\signing-scripts.log"
235235
ToolsPath="$(CIToolsPath)"
236236
Condition="!$(DelaySign) and '@(ScriptsToSign)' != ''"/>
@@ -272,7 +272,7 @@
272272
UnsignedFiles="@(InstallersToSign)"
273273
DestinationPath="$(LibraryRoot)\signed"
274274
SigningLogPath="$(LibraryRoot)\msi-signing.log"
275-
Certificates="10006"
275+
Certificates="402"
276276
ToolsPath="$(CIToolsPath)"
277277
Condition="!$(DelaySign) and '@(InstallersToSign)' != ''"/>
278278

src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/Commands.StreamAnalytics.Test.csproj

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Authorization.0.19.2-preview\lib\net40\Microsoft.Azure.Management.Authorization.dll</HintPath>
6767
</Reference>
6868
<Reference Include="Microsoft.Azure.Management.StreamAnalytics">
69-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.StreamAnalytics.1.7.1\lib\net40\Microsoft.Azure.Management.StreamAnalytics.dll</HintPath>
69+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.StreamAnalytics.1.7.3\lib\net40\Microsoft.Azure.Management.StreamAnalytics.dll</HintPath>
7070
</Reference>
7171
<Reference Include="Microsoft.Azure.ResourceManager, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
7272
<SpecificVersion>False</SpecificVersion>
@@ -197,6 +197,9 @@
197197
<None Include="packages.config">
198198
<SubType>Designer</SubType>
199199
</None>
200+
<None Include="Resources\Function.json">
201+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
202+
</None>
200203
<None Include="Resources\Job.json">
201204
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
202205
</None>
@@ -206,6 +209,9 @@
206209
<None Include="Resources\Output.json">
207210
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
208211
</None>
212+
<None Include="Resources\RetrieveDefaultFunctionDefinitionRequest.json">
213+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
214+
</None>
209215
<None Include="Resources\Transformation.json">
210216
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
211217
</None>
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"name": "scoreTweet",
3+
"properties": {
4+
"type": "Scalar",
5+
"properties": {
6+
"inputs": [
7+
{
8+
"dataType": "nvarchar(max)",
9+
"isConfigurationParameter": false
10+
}
11+
],
12+
"output": {
13+
"dataType": "nvarchar(max)"
14+
},
15+
"binding": {
16+
"type": "Microsoft.MachineLearning/WebService",
17+
"properties": {
18+
"endpoint": "https://ussouthcentral.services.azureml.net/workspaces/f80d5d7a77fa4a46bf2a30c63c078dca/services/b7be5e40fd194258896fb602c1858eaf/execute?api-version=2.0&details=true",
19+
"apiKey": "$EncryptedStringForTesting",
20+
"inputs": {
21+
"name": "input1",
22+
"columnNames": [
23+
{
24+
"name": "tweet",
25+
"dataType": "String",
26+
"mapTo": 0
27+
}
28+
]
29+
},
30+
"outputs": [
31+
{
32+
"name": "Sentiment",
33+
"dataType": "String"
34+
}
35+
],
36+
"batchSize": 10
37+
}
38+
}
39+
}
40+
}
41+
}
Lines changed: 96 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,104 @@
11
{
2-
"location": "West US",
3-
"tags": { "key": "value" },
2+
"location": "West US",
3+
"tags": { "key": "value" },
44

5-
"properties": {
6-
"sku": {
7-
"name": "standard"
8-
},
9-
"inputs": [
10-
{
11-
"name": "Input",
12-
"properties": {
13-
"type": "stream",
14-
"serialization": {
15-
"type": "JSON",
16-
"properties": {
17-
"encoding": "UTF8"
5+
"properties": {
6+
"sku": {
7+
"name": "standard"
8+
},
9+
"inputs": [
10+
{
11+
"name": "Input",
12+
"properties": {
13+
"type": "stream",
14+
"serialization": {
15+
"type": "JSON",
16+
"properties": {
17+
"encoding": "UTF8"
18+
}
19+
},
20+
"datasource": {
21+
"type": "Microsoft.Storage/Blob",
22+
"properties": {
23+
"storageAccounts": [
24+
{
25+
"accountName": "azurenrtdogfood",
26+
"accountKey": "$EncryptedStringForTesting"
27+
}
28+
],
29+
"container": "samples",
30+
"pathPattern": ""
31+
}
32+
}
33+
}
1834
}
19-
},
20-
"datasource": {
21-
"type": "Microsoft.Storage/Blob",
35+
],
36+
"transformation": {
37+
"name": "transform1",
2238
"properties": {
23-
"storageAccounts" : [
24-
{
25-
"accountName": "azurenrtdogfood",
26-
"accountKey": "$EncryptedStringForTesting"
39+
"streamingUnits": 1,
40+
"query": "select Id, Name from Input"
41+
}
42+
},
43+
"outputs": [
44+
{
45+
"name": "Output",
46+
"properties": {
47+
"datasource": {
48+
"type": "Microsoft.Sql/Server/Database",
49+
"properties": {
50+
"server": "$EncryptedStringForTesting.database.windows.net",
51+
"database": "azurenrtsql",
52+
"user": "azurenrt@$EncryptedStringForTesting",
53+
"password": "$EncryptedStringForTesting",
54+
"table": "Samples"
55+
}
56+
}
2757
}
28-
],
29-
"container": "samples",
30-
"pathPattern": ""
3158
}
32-
}
33-
}
34-
}
35-
],
36-
"transformation": {
37-
"name": "transform1",
38-
"properties": {
39-
"streamingUnits": 1,
40-
"query": "select Id, Name from Input"
41-
}
42-
},
43-
"outputs": [
44-
{
45-
"name": "Output",
46-
"properties": {
47-
"datasource": {
48-
"type": "Microsoft.Sql/Server/Database",
49-
"properties": {
50-
"server": "$EncryptedStringForTesting.database.windows.net",
51-
"database": "azurenrtsql",
52-
"user": "azurenrt@$EncryptedStringForTesting",
53-
"password": "$EncryptedStringForTesting",
54-
"table": "Samples"
59+
],
60+
"functions": [
61+
{
62+
"name": "scoreTweet",
63+
"properties": {
64+
"type": "Scalar",
65+
"properties": {
66+
"inputs": [
67+
{
68+
"dataType": "nvarchar(max)",
69+
"isConfigurationParameter": false
70+
}
71+
],
72+
"output": {
73+
"dataType": "nvarchar(max)"
74+
},
75+
"binding": {
76+
"type": "Microsoft.MachineLearning/WebService",
77+
"properties": {
78+
"endpoint": "https://ussouthcentral.services.azureml.net/workspaces/f80d5d7a77fa4a46bf2a30c63c078dca/services/b7be5e40fd194258896fb602c1858eaf/execute?api-version=2.0&details=true",
79+
"apiKey": "$EncryptedStringForTesting",
80+
"inputs": {
81+
"name": "input1",
82+
"columnNames": [
83+
{
84+
"name": "tweet",
85+
"dataType": "String",
86+
"mapTo": 0
87+
}
88+
]
89+
},
90+
"outputs": [
91+
{
92+
"name": "Sentiment",
93+
"dataType": "String"
94+
}
95+
],
96+
"batchSize": 10
97+
}
98+
}
99+
}
100+
}
55101
}
56-
}
57-
}
58-
}
59-
]
60-
}
102+
]
103+
}
61104
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"bindingType": "Microsoft.MachineLearning/WebService",
3+
"bindingRetrievalProperties": {
4+
"executeEndpoint": "https://ussouthcentral.services.azureml.net/workspaces/f80d5d7a77fa4a46bf2a30c63c078dca/services/b7be5e40fd194258896fb602c1858eaf/execute?api-version=2.0&details=true",
5+
"udfType": "Scalar"
6+
}
7+
}
8+

src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/ScenarioTests/EndToEndTests.ps1

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ function Test-TestStreamingAnalyticsE2E
2323
$inputName = "Input"
2424
$outputName = "Output"
2525
$transformationName = "transform1"
26+
$functionName = "scoreTweet"
2627

2728
# Create Job
2829
$actual = New-AzureRmStreamAnalyticsJob -File .\Resources\job.json -ResourceGroupName $resourceGroup -Name $jobName -Force
@@ -41,6 +42,10 @@ function Test-TestStreamingAnalyticsE2E
4142
$actual = Get-AzureRmStreamAnalyticsTransformation -JobName $jobName -Name $transformationName -ResourceGroupName $resourceGroup
4243
Assert-AreEqual $transformationName $actual.Name
4344

45+
# Get Job function
46+
$actual = Get-AzureRmStreamAnalyticsFunction -JobName $jobName -Name $functionName -ResourceGroupName $resourceGroup
47+
Assert-AreEqual $functionName $actual.Name
48+
4449
# New Input (Patch)
4550
$actual = New-AzureRmStreamAnalyticsInput -File .\Resources\Input.json -JobName $jobName -ResourceGroupName $resourceGroup -Force
4651
Assert-AreEqual $inputName $actual.Name
@@ -63,6 +68,15 @@ function Test-TestStreamingAnalyticsE2E
6368
$actual = New-AzureRmStreamAnalyticsTransformation -File .\Resources\Transformation.json -JobName $jobName -ResourceGroupName $resourceGroup -Force
6469
Assert-AreEqual $transformationName $actual.Name
6570

71+
# New Function (Patch)
72+
$actual = New-AzureRmStreamAnalyticsFunction -File .\Resources\Function.json -JobName $jobName -ResourceGroupName $resourceGroup -Force
73+
Assert-AreEqual $functionName $actual.Name
74+
75+
# Test Function
76+
$actual = Test-AzureRmStreamAnalyticsFunction -JobName $jobName -Name $functionName -ResourceGroupName $resourceGroup
77+
$expected = "True"
78+
Assert-AreEqual $expected $actual
79+
6680
# Get Quota
6781
$actual = Get-AzureRmStreamAnalyticsQuota -Location "West US"
6882
$expected = 0
@@ -90,6 +104,15 @@ function Test-TestStreamingAnalyticsE2E
90104
$expected = "True"
91105
Assert-AreEqual $expected $actual
92106

107+
# Get Function Default Definition
108+
$actual = Get-AzureRmStreamAnalyticsDefaultFunctionDefinition -File .\Resources\RetrieveDefaultFunctionDefinitionRequest.json -Name $functionName -JobName $jobName -ResourceGroupName $resourceGroup
109+
Assert-AreEqual $functionName $actual.Name
110+
111+
# Remove Function
112+
$actual = Remove-AzureRmStreamAnalyticsFunction -JobName $jobName -Name $functionName -ResourceGroupName $resourceGroup -Force
113+
$expected = "True"
114+
Assert-AreEqual $expected $actual
115+
93116
# Remove Output
94117
$actual = Remove-AzureRmStreamAnalyticsOutput -JobName $jobName -Name Output -ResourceGroupName $resourceGroup -Force
95118
$expected = "True"

0 commit comments

Comments
 (0)