@@ -9,7 +9,7 @@ schema: 2.0.0
9
9
10
10
## SYNOPSIS
11
11
12
- {{ Fill in the Synopsis }}
12
+ Invokes a KQL query over an Azure Data Explorer Cluster.
13
13
14
14
## SYNTAX
15
15
@@ -24,23 +24,49 @@ Invoke-KustoQuery
24
24
25
25
## DESCRIPTION
26
26
27
- {{ Fill in the Description }}
27
+ The ` Invoke-KustoQuery ` cmdlet allows you to can be used to run
28
+ [ Kusto Query Language (KQL)] ( https://learn.microsoft.com/en-us/kusto/query/?view=microsoft-fabric ) queries or
29
+ [ T-SQL] ( https://learn.microsoft.com/en-us/kusto/query/t-sql?view=microsoft-fabric ) queries on the tables on a
30
+ specified Database of your Azure Data Explorer Cluster.
28
31
29
32
## EXAMPLES
30
33
31
- ### Example 1
34
+ ### Example 1: Run a KQL Query
32
35
33
36
``` powershell
34
- PS C:\> {{ Add example code here }}
37
+ Invoke-KustoQuery 'search * | summarize count() by $table'
35
38
```
36
39
37
- {{ Add example description here }}
40
+ This examples shows how to get the log count summarized by each table.
41
+
42
+ ### Example 2: Run a KQL Query on specified Database
43
+
44
+ ``` powershell
45
+ Invoke-KustoQuery 'myTable | take 10' -Database myDb
46
+ ```
47
+
48
+ ### Example 3: Run a KQL Query with specified request properties
49
+
50
+ ``` powershell
51
+ $requestProps = New-KustoClientRequestProperties -NoTruncation -ServerTimeout '00:05:00'
52
+ Invoke-KustoQuery 'myTable | project fooProp, barProp' -RequestProperties $requestProps
53
+ ```
54
+
55
+ This example demonstrates how you can specify request properties for your query.
56
+ See also [ ` New-KustoClientRequestProperties ` ] ( New-KustoClientRequestProperties.md ) for more details.
57
+
58
+ - In this case ` -NoTruncation ` is particularly useful to overcome the 500k row limit on your query.
59
+ - ` -ServerTimeout '00:05:00' ` allows the query to run for at least 5 minutes before timing out.
38
60
39
61
## PARAMETERS
40
62
41
63
### -Database
42
64
43
- {{ Fill Database Description }}
65
+ This non mandatory parameter determines which Database in your Cluster will be targetted by your ingest command.
66
+
67
+ > [ !NOTE]
68
+ >
69
+ > If not supplied, the Database used will be the one specified when you called [ ` Connect-Kusto ` ] ( Connect-Kusto.md ) .
44
70
45
71
``` yaml
46
72
Type : String
@@ -56,7 +82,7 @@ Accept wildcard characters: False
56
82
57
83
### -OutputType
58
84
59
- {{ Fill OutputType Description }}
85
+ Determines the output type this cmdlet will produce. __The default value is ` PSObject`__.
60
86
61
87
` ` ` yaml
62
88
Type: OutputType
@@ -73,7 +99,7 @@ Accept wildcard characters: False
73
99
74
100
# ## -Query
75
101
76
- {{ Fill Query Description }}
102
+ The KQL or T-SQL query you want to run against a specified Database in your Cluster.
77
103
78
104
` ` ` yaml
79
105
Type: String
@@ -87,25 +113,10 @@ Accept pipeline input: False
87
113
Accept wildcard characters: False
88
114
` ` `
89
115
90
- ### -ProgressAction
91
-
92
- {{ Fill ProgressAction Description }}
93
-
94
- ` ` ` yaml
95
- Type : ActionPreference
96
- Parameter Sets : (All)
97
- Aliases : proga
98
-
99
- Required : False
100
- Position : Named
101
- Default value : None
102
- Accept pipeline input : False
103
- Accept wildcard characters : False
104
- ` ` `
105
-
106
116
# ## -RequestProperties
107
117
108
- {{ Fill RequestProperties Description }}
118
+ Request properties control how a query or command executes and returns results.
119
+ For creating a `ClientRequestProperties` object, checkout [`New-KustoClientRequestProperties`](New-KustoClientRequestProperties.md).
109
120
110
121
` ` ` yaml
111
122
Type: ClientRequestProperties
@@ -142,3 +153,7 @@ By default, this cmdlet outputs `PSObject`.
142
153
# # NOTES
143
154
144
155
# # RELATED LINKS
156
+
157
+ [Kusto Query Language (KQL)](https://learn.microsoft.com/en-us/kusto/query/?view=microsoft-fabric)
158
+
159
+ [T-SQL](https://learn.microsoft.com/en-us/kusto/query/t-sql?view=microsoft-fabric)
0 commit comments