external help file | Module Name | online version | schema |
---|---|---|---|
PowerShellKusto.dll-Help.xml |
PowerShellKusto |
2.0.0 |
Creates a new ClientRequestProperties
object.
New-KustoClientRequestProperties
[-Application <String>]
[-User <String>]
[-ClientRequestId <String>]
[-Parameters <Hashtable>]
[-Options <Hashtable>]
[-NoTruncation]
[-ServerTimeout <TimeSpan>]
[<CommonParameters>]
The New-KustoClientRequestProperties
cmdlet can be used to create a new ClientRequestProperties
object
to manage the interaction between client and service. This object can be later on passed as argument to the request cmdlets: Invoke-KustoControlCommand
, Invoke-KustoQuery
,
Set-KustoBatchingPolicy
and Set-KustoIngestionMapping
.
The object contains the following information:
- Request properties: A mapping of specific options for customizing request behavior.
- Query parameters: A mapping of user-declared parameters that allow for secure query customization.
- Named properties: Client request ID, application details, and user data, primarily used for debugging and tracing.
$requestProps = New-KustoClientRequestProperties -NoTruncation -ServerTimeout '00:05:00'
Invoke-KustoQuery 'myTable | project fooProp, barProp' -RequestProperties $requestProps
This example demonstrates how you can specify request properties for your query.
- In this case
-NoTruncation
is particularly useful to overcome the 500k row limit on your query. -ServerTimeout '00:05:00'
allows the query to run for at least 5 minutes before timing out.
$requestProps = New-KustoClientRequestProperties -Options @{
query_language = 'sql'
request_app_name = 'myApp'
norequesttimeout = $true
}
Invoke-KustoQuery 'SELECT top(10) * FROM MyTable' -RequestProperties $requestProps
Tip
Out of the supported request properties, this cmdlet offers -NoTruncation
(notruncation
) and -ServerTimeout
(servertimeout
) as a Parameter.
The -Options
Parameter is used to add extra options to your request that aren't by default available.
See Supported request properties for the additional options.
The name of the client application that makes the request. This value is used for tracing.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
An ID used to identify the request. This specification is helpful for debugging and may be required for specific scenarios like query cancellation.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Disables truncation of query results returned to the caller.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies a Hashtable of additional Supported request properties that aren't by default available as a Parameter.
Type: Hashtable
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies a Hashtable of query parameters declaration statement that are used to declare parameters for a Kusto Query Language (KQL) query.
Type: Hashtable
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Overrides the default request timeout.
Type: TimeSpan
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The identity of the user that makes the request. This value is used for tracing.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters. For more information, see about_CommonParameters.
Kusto Data ClientRequestProperties class