Skip to main content

kpis

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

Overview

Namekpis
TypeResource
Idazure_extras.customer_insights.kpis

Fields

The following fields are returned by SELECT queries:

OK. Successfully get the KPI.

NameDatatypeDescription
idstringResource ID.
namestringResource name.
propertiesobjectDefines the KPI Threshold limits.
typestringResource type.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresourceGroupName, hubName, kpiName, subscriptionIdGets a KPI in the hub.
list_by_hubselectresourceGroupName, hubName, subscriptionIdGets all the KPIs in the specified hub.
create_or_updateinsertresourceGroupName, hubName, kpiName, subscriptionIdCreates a KPI or updates an existing KPI in the hub.
deletedeleteresourceGroupName, hubName, kpiName, subscriptionIdDeletes a KPI in the hub.
reprocessexecresourceGroupName, hubName, kpiName, subscriptionIdReprocesses the Kpi values of the specified KPI.

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.
kpiNamestringThe name of the KPI.
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 KPI in the hub.

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

INSERT examples

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

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

DELETE examples

Deletes a KPI in the hub.

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

Lifecycle Methods

Reprocesses the Kpi values of the specified KPI.

EXEC azure_extras.customer_insights.kpis.reprocess 
@resourceGroupName='{{ resourceGroupName }}' --required,
@hubName='{{ hubName }}' --required,
@kpiName='{{ kpiName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
;