Skip to main content

predictions

Creates, updates, deletes, gets or lists a predictions resource.

Overview

Namepredictions
TypeResource
Idazure_extras.customer_insights.predictions

Fields

The following fields are returned by SELECT queries:

OK. Successfully get the Prediction.

NameDatatypeDescription
idstringResource ID.
namestringResource name.
propertiesobjectThe prediction definition.
typestringResource type.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresourceGroupName, hubName, predictionName, subscriptionIdGets a Prediction in the hub.
list_by_hubselectresourceGroupName, hubName, subscriptionIdGets all the predictions in the specified hub.
create_or_updateinsertresourceGroupName, hubName, predictionName, subscriptionIdCreates a Prediction or updates an existing Prediction in the hub.
deletedeleteresourceGroupName, hubName, predictionName, subscriptionIdDeletes a Prediction in the hub.
model_statusexecresourceGroupName, hubName, predictionName, subscriptionId, statusCreates or updates the model status of prediction.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
hubNamestringThe name of the hub.
predictionNamestringThe name of the Prediction.
resourceGroupNamestringThe name of the resource group.
subscriptionIdstringGets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

SELECT examples

Gets a Prediction in the hub.

SELECT
id,
name,
properties,
type
FROM azure_extras.customer_insights.predictions
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND hubName = '{{ hubName }}' -- required
AND predictionName = '{{ predictionName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;

INSERT examples

Creates a Prediction or updates an existing Prediction in the hub.

INSERT INTO azure_extras.customer_insights.predictions (
data__properties,
resourceGroupName,
hubName,
predictionName,
subscriptionId
)
SELECT
'{{ properties }}',
'{{ resourceGroupName }}',
'{{ hubName }}',
'{{ predictionName }}',
'{{ subscriptionId }}'
RETURNING
id,
name,
properties,
type
;

DELETE examples

Deletes a Prediction in the hub.

DELETE FROM azure_extras.customer_insights.predictions
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND hubName = '{{ hubName }}' --required
AND predictionName = '{{ predictionName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
;

Lifecycle Methods

Creates or updates the model status of prediction.

EXEC azure_extras.customer_insights.predictions.model_status 
@resourceGroupName='{{ resourceGroupName }}' --required,
@hubName='{{ hubName }}' --required,
@predictionName='{{ predictionName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
@@json=
'{
"status": "{{ status }}"
}'
;