Transformation

Create

Creates a new transformation within a Stream Analytics job.

Request

The Create Transformation request is specified as follows.

For headers and parameters that are used by all requests related to Stream Analytics jobs, see Common parameters and headers. You must make sure that the request that is made to the management service is secure. For additional details, see Authenticating Azure Resource Manager requests.

Method Request URI
PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.StreamAnalytics/streamingjobs/{job-name}/transformations/{transformation-name}?api-version={api-version}

Replace {subscription-id} with your subscription ID.

Replace {resource-group-name} with the name of the resource group that the job belongs to. For more information about creating resource groups, see Using resource groups to manage your Azure resources.

Replace {job-name} with the name of the Stream Analytics job.

Replace {transformation-name} with the name (or alias) that you want to assign to the transformation that you are creating. The transformation name is case insensitive and must contain only numbers, letters, and hyphens. It must be 3 to 63 characters long.

Replace {api-version} with 2015-10-01 in the URI.

JSON


{    
   "properties":{    
      "streamingUnits":1,  
      "query":"select * from MyEventHubSource"  
   }  
}  
Element name Required Notes
streamingUnits No The number of streaming units that the streaming job uses. Defaults to 1 if the value is not specified.
query Yes The query that will be run in the Stream Analytics job.

Response

Status code: 201

JSON


{    
   "id":"/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/Default-SA-CentralUS/providers/Microsoft.StreamAnalytics/streamingjobs/myStreamingSample/transformations/MyTransformation",  
   "name":"MyTransformation",  
   "type":"Microsoft.StreamAnalytics/streamingjobs/transformations",  
   "properties":{    
      "streamingUnits":1,  
      "script":null,  
      "query":"select * from MyEventHubSource"  
   }  
}  

Delete

Deletes a transformation from a Stream Analytics job in Microsoft Azure.

Request

The Delete Transformation request is specified as follows.

For headers and parameters that are used by all requests related to Stream Analytics jobs, see Common parameters and headers. You must make sure that the request that is made to the management service is secure. For additional details, see Authenticating Azure Resource Manager requests.

Method Request URI
DELETE https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.StreamAnalytics/streamingjobs/{job-name}/transformations/{transformation-name}?api-version={api-version}

Replace {subscription-id} with your subscription ID.

Replace {resource-group-name} with the name of the resource group that this transformation belongs to. For more information about creating resource groups, see Using resource groups to manage your Azure resources.

Replace {job-name} with the name of the Stream Analytics job that you are deleting.

Replace {transformation-name} with the name (or alias) that you want to assign to the transformation that you are creating. The transformation name is case insensitive and must contain only numbers, letters, and hyphens. It must be 3 to 63 characters long.

Replace {api-version} with 2015-10-01 in the URI.

Response

Status code: 202

This is an asynchronous operation that returns a status of 202 until the job is successfully deleted. The Location response header contains the URI that is used to obtain the status of the process. While the process is running, a call to the URI in the Location header returns a status of 202. When the process finishes, the URI in the Location header returns a status of 200.

Get

Gets information about a specific transformation.

Request

The Get Information about a Transformation request is specified as follows.

For headers and parameters that are used by all requests related to Stream Analytics jobs, see Common parameters and headers. You must make sure that the request that is made to the management service is secure. For additional details, see Authenticating Azure Resource Manager requests.

Method Request URI
GET https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.StreamAnalytics/streamingjobs/{job-name}/transformations/{transformation-name}?api-version={api-version}

Replace {subscription-id} with your subscription ID.

Replace {resource-group-name} with the name of the resource group that this job will belong to. For more information about creating resource groups, see Using resource groups to manage your Azure resources.

Replace {job-name} with the name of the Stream Analytics job that your output will be associated with.

Replace {api-version} with 2015-10-01 in the URI.

Response

Status code: 200

JSON


{    
   "id":"/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/Default-SA-CentralUS/providers/Microsoft.StreamAnalytics/streamingjobs/myStreamingSample/transformations/MyTransformation",  
   "name":"MyTransformation",  
   "type":"Microsoft.StreamAnalytics/streamingjobs/transformations",  
   "properties":{    
      "streamingUnits":1,  
      "query":"select * from MyEventHubSource"  
   }  
}  

Update

Updates the properties that are assigned to a transformation.

Request

The Update Transformation request is specified as follows.

For headers and parameters that are used by all requests related to Stream Analytics jobs, see Common parameters and headers. You must make sure that the request that is made to the management service is secure. For additional details, see Authenticating Azure Resource Manager requests.

Method Request URI
PATCH https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.StreamAnalytics/streamingjobs/{job-name}/transformations/{transformation-name}?api-version={api-version}

Replace {subscription-id} with your subscription ID.

Replace {resource-group-name} with the name of the resource group that this job will belong to. For more information about creating resource groups, see Using resource groups to manage your Azure resources.

Replace {job-name} with the name of the Stream Analytics job that you are updating.

Replace {transformation-name} with the name of the transformation that you are updating.

Replace {api-version} with 2015-10-01 in the URI.

JSON


{  
   "properties": {  
      "streamingUnits": 3  
   }  
}  

Any one or more of the input properties may be specified in the request body, setting/replacing any existing value for each property specified.

For more information about input properties, see Create Transformation (Azure Stream Analytics).

Response

Status code: 201

JSON


{    
   "id":"/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/Default-SA-CentralUS/providers/Microsoft.StreamAnalytics/streamingjobs/myStreamingSample/transformations/MyTransformation",  
   "name":"MyTransformation",  
   "type":"Microsoft.StreamAnalytics/streamingjobs/transformations",  
   "properties":{    
      "streamingUnits":3,  
      "script":null,  
      "query":"select * from MyEventHubSource"  
   }  
}  

The response body contains the updated transformation resource.