Skip to main content

query_texts

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

Overview

Namequery_texts
TypeResource
Idazure_extras.rdbms.query_texts

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long
namestringThe name of the resource.
queryIdstringQuery identifier unique to the server.
queryTextstringQuery text.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, server_name, query_id, subscription_idRetrieve the Query-Store query texts for the queryId.
list_by_serverselectresource_group_name, server_name, subscription_idRetrieve the Query-Store query texts for specified queryIds.

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
query_idstringThe Query-Store query identifier. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
server_namestringThe name of the server. Required.
subscription_idstring

SELECT examples

Retrieve the Query-Store query texts for the queryId.

SELECT
id,
name,
queryId,
queryText,
type
FROM azure_extras.rdbms.query_texts
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND server_name = '{{ server_name }}' -- required
AND query_id = '{{ query_id }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;