From d6d760b2f3e9ebfc9bc5c31e01448c81aa61a4e4 Mon Sep 17 00:00:00 2001 From: Santiago Squarzon Date: Tue, 24 Dec 2024 14:26:55 -0300 Subject: [PATCH] done with docs --- docs/en-US/Connect-Kusto.md | 4 +- docs/en-US/Invoke-KustoControlCommand.md | 46 +++++++++-------- docs/en-US/Invoke-KustoIngestFromStorage.md | 9 ++-- docs/en-US/Invoke-KustoIngestFromStream.md | 8 +-- docs/en-US/Invoke-KustoQuery.md | 12 +++-- .../en-US/New-KustoClientRequestProperties.md | 6 +-- docs/en-US/New-KustoColumnMapping.md | 6 ++- docs/en-US/New-KustoIngestionMapping.md | 4 +- docs/en-US/Set-KustoBatchingPolicy.md | 13 +++-- docs/en-US/Set-KustoIngestionMapping.md | 49 ++++++++++--------- 10 files changed, 85 insertions(+), 72 deletions(-) diff --git a/docs/en-US/Connect-Kusto.md b/docs/en-US/Connect-Kusto.md index 1e684e7..205db49 100644 --- a/docs/en-US/Connect-Kusto.md +++ b/docs/en-US/Connect-Kusto.md @@ -84,7 +84,9 @@ Connect-Kusto ## DESCRIPTION -The `Connect-Kusto` cmdlet is the main entry point for the cmdlets in this module and it's used to establish a connection with your Azure Data Explorer. The authentication methods offered by this cmdlet are: +The `Connect-Kusto` cmdlet is the main entry point for the cmdlets in this module and it's used to establish a connection with your Azure Data Explorer Cluster. + +The available authentication methods are: - User prompt - System or User Managed Identity diff --git a/docs/en-US/Invoke-KustoControlCommand.md b/docs/en-US/Invoke-KustoControlCommand.md index a045d17..550757d 100644 --- a/docs/en-US/Invoke-KustoControlCommand.md +++ b/docs/en-US/Invoke-KustoControlCommand.md @@ -31,8 +31,7 @@ The `Invoke-KustoControlCommand` cmdlet allows you to invoke management commands ### Example 1: Invoke a control command ```powershell -Invoke-KustoControlCommand ' -.create table MyLogs( +Invoke-KustoControlCommand '.create table MyLogs( Level:string, Timestamp:datetime, UserId:string, @@ -41,30 +40,29 @@ Invoke-KustoControlCommand ' ProcessId:int32)' ``` -This example shows how to create a new Table on a database specified by [`Connect-Kusto`](Connect-Kusto.md). +This example shows how to create a new Table on a database specified by [`Connect-Kusto`](Connect-Kusto.md#-database). ### Example 2: Invoke a control command over a specified Database ```powershell -Invoke-KustoControlCommand -Database myDb ' -.show tables details -| where TotalRowCount > 0 -| extend TotalExtentSize = format_bytes(TotalExtentSize) -| extend TotalOriginalSize = format_bytes(TotalOriginalSize) -| extend HotExtentSize = format_bytes(HotExtentSize) -| extend HotOriginalSize = format_bytes(HotOriginalSize) -| project-away - Folder, - DocString, - AuthorizedPrincipals, - RetentionPolicy, - CachingPolicy, - ShardingPolicy, - MergePolicy, - StreamingIngestionPolicy, - IngestionBatchingPolicy, - RowOrderPolicy, - TableId' +Invoke-KustoControlCommand -Database myDb '.show tables details + | where TotalRowCount > 0 + | extend TotalExtentSize = format_bytes(TotalExtentSize) + | extend TotalOriginalSize = format_bytes(TotalOriginalSize) + | extend HotExtentSize = format_bytes(HotExtentSize) + | extend HotOriginalSize = format_bytes(HotOriginalSize) + | project-away + Folder, + DocString, + AuthorizedPrincipals, + RetentionPolicy, + CachingPolicy, + ShardingPolicy, + MergePolicy, + StreamingIngestionPolicy, + IngestionBatchingPolicy, + RowOrderPolicy, + TableId' ``` This example demonstrates how to get information on all tables in the `myDb` Database. @@ -93,7 +91,7 @@ This non mandatory parameter determines which Database in your Cluster will be t > [!NOTE] > -> If not supplied, the Database used will be the one specified when you called [`Connect-Kusto`](Connect-Kusto.md). +> If not supplied, the Database used will be the one specified when you called [`Connect-Kusto`](Connect-Kusto.md#-database). ```yaml Type: String @@ -161,7 +159,7 @@ For more information, see [about_CommonParameters](http://go.microsoft.com/fwlin ### System.Data.DataTable -The output type from this cmdlet is determined by the `-OutputType` parameter. +The output type from this cmdlet is determined by the [`-OutputType` parameter](#-outputtype). By default, this cmdlet outputs `PSObject`. ## NOTES diff --git a/docs/en-US/Invoke-KustoIngestFromStorage.md b/docs/en-US/Invoke-KustoIngestFromStorage.md index cf07609..fcfabc5 100644 --- a/docs/en-US/Invoke-KustoIngestFromStorage.md +++ b/docs/en-US/Invoke-KustoIngestFromStorage.md @@ -31,6 +31,7 @@ Invoke-KustoIngestFromStorage The `Invoke-KustoIngestFromStorage` cmdlet can be used to ingest local or blob storage files into a table on your Azure Data Explorer Cluster. For ingestion from a [__Stream__](https://learn.microsoft.com/en-us/dotnet/api/system.io.stream) see [`Invoke-KustoIngestFromStream`](Invoke-KustoIngestFromStream.md). + For more details on Kusto ingestion, checkout [__Ingest from storage__](https://learn.microsoft.com/en-us/kusto/management/data-ingestion/ingest-from-storage?view=microsoft-fabric). @@ -65,7 +66,7 @@ Invoke-KustoIngestFromStorage .\myJson.json -Table MyJsonTable -Database myDb -F > [!NOTE] > -> This example specifies a format of `multijson` instead `json` because a _JSON Array_ is classified as multijson, while _JSON Lines_ adhere to the `json` format. +> This example specifies a format of `multijson` instead `json` because a _JSON Array_ is classified as `multijson`, while _JSON Lines_ adhere to the `json` format. > See [__The JSON format__](https://learn.microsoft.com/en-us/azure/data-explorer/ingest-json-formats?tabs=kusto-query-language#the-json-format) for more details. ## PARAMETERS @@ -76,7 +77,7 @@ This non mandatory parameter determines which Database in your Cluster will be t > [!NOTE] > -> If not supplied, the Database used will be the one specified when you called [`Connect-Kusto`](Connect-Kusto.md). +> If not supplied, the Database used will be the one specified when you called [`Connect-Kusto`](Connect-Kusto.md#-database). ```yaml Type: String @@ -92,7 +93,7 @@ Accept wildcard characters: False ### -Format -This parameter determines the format of the file to be ingested. The default value is __`csv`__. +This parameter determines the format of the file to be ingested. __The default value is `csv`__. ```yaml Type: DataSourceFormat @@ -110,7 +111,7 @@ Accept wildcard characters: False ### -IgnoreFirstRecord This switch indicates that ingestion should ignore the first record of a file. -This property is useful for files in `CSV` and similar formats, +This property is useful for files in CSV and similar formats, if the first record in the file are the column names. ```yaml diff --git a/docs/en-US/Invoke-KustoIngestFromStream.md b/docs/en-US/Invoke-KustoIngestFromStream.md index 61dcb64..760d49e 100644 --- a/docs/en-US/Invoke-KustoIngestFromStream.md +++ b/docs/en-US/Invoke-KustoIngestFromStream.md @@ -29,7 +29,7 @@ Invoke-KustoIngestFromStream ## DESCRIPTION -Similar to [`Invoke-KustoIngestFromStorage`](Invoke-KustoIngestFromStorage.md), the `Invoke-KustoIngestFromStream` cmdlet allows you to ingest data into a table on your Azure Data Explorer Cluster, the only difference is the source being a [__Stream__](https://learn.microsoft.com/en-us/dotnet/api/system.io.stream) instead of a path or URI. +Similar to [`Invoke-KustoIngestFromStorage`](Invoke-KustoIngestFromStorage.md), the `Invoke-KustoIngestFromStream` cmdlet allows you to ingest data into a table on your Azure Data Explorer Cluster, the only difference is the source being a [__Stream__](https://learn.microsoft.com/en-us/dotnet/api/system.io.stream) instead of a Path or URI. ## EXAMPLES @@ -49,7 +49,7 @@ Invoke-KustoIngestFromStream $fs -Table myTable -Database myDb -Format multijson > [!NOTE] > -> This example specifies a format of `multijson` instead `json` because a _JSON Array_ is classified as multijson, while _JSON Lines_ adhere to the `json` format. +> This example specifies a format of `multijson` instead `json` because a _JSON Array_ is classified as `multijson`, while _JSON Lines_ adhere to the `json` format. > See [__The JSON format__](https://learn.microsoft.com/en-us/azure/data-explorer/ingest-json-formats?tabs=kusto-query-language#the-json-format) for more details. ## PARAMETERS @@ -60,7 +60,7 @@ This non mandatory parameter determines which Database in your Cluster will be t > [!NOTE] > -> If not supplied, the Database used will be the one specified when you called [`Connect-Kusto`](Connect-Kusto.md). +> If not supplied, the Database used will be the one specified when you called [`Connect-Kusto`](Connect-Kusto.md#-database). ```yaml Type: String @@ -94,7 +94,7 @@ Accept wildcard characters: False ### -IgnoreFirstRecord This switch indicates that ingestion should ignore the first record of a file. -This property is useful for files in `CSV` and similar formats, +This property is useful for files in CSV and similar formats, if the first record in the file are the column names. ```yaml diff --git a/docs/en-US/Invoke-KustoQuery.md b/docs/en-US/Invoke-KustoQuery.md index d628ce4..bf42cf2 100644 --- a/docs/en-US/Invoke-KustoQuery.md +++ b/docs/en-US/Invoke-KustoQuery.md @@ -26,7 +26,7 @@ Invoke-KustoQuery The `Invoke-KustoQuery` cmdlet allows you to run [Kusto Query Language (KQL)](https://learn.microsoft.com/en-us/kusto/query/?view=microsoft-fabric) queries or -[T-SQL](https://learn.microsoft.com/en-us/kusto/query/t-sql?view=microsoft-fabric) queries on the tables on a +[T-SQL](https://learn.microsoft.com/en-us/kusto/query/t-sql?view=microsoft-fabric) queries on a specified Database of your Azure Data Explorer Cluster. ## EXAMPLES @@ -39,6 +39,10 @@ Invoke-KustoQuery 'search * | summarize count() by $table' This examples shows how to get the log count summarized by each table. +> [!TIP] +> +> In this example, the database is specified by the database used when you called [`Connect-Kusto`](Connect-Kusto.md#-database). + ### Example 2: Run a KQL Query on specified Database ```powershell @@ -62,11 +66,11 @@ See also [`New-KustoClientRequestProperties`](New-KustoClientRequestProperties.m ### -Database -This non mandatory parameter determines which Database in your Cluster will be targetted by your ingest command. +This non mandatory parameter determines which Database in your Cluster will be targetted by your query command. > [!NOTE] > -> If not supplied, the Database used will be the one specified when you called [`Connect-Kusto`](Connect-Kusto.md). +> If not supplied, the Database used will be the one specified when you called [`Connect-Kusto`](Connect-Kusto.md#-database). ```yaml Type: String @@ -150,7 +154,7 @@ For more information, see [about_CommonParameters](http://go.microsoft.com/fwlin ### System.Data.DataTable -The output type from this cmdlet is determined by the `-OutputType` parameter. +The output type from this cmdlet is determined by the [`-OutputType` parameter](#-outputtype). By default, this cmdlet outputs `PSObject`. ## NOTES diff --git a/docs/en-US/New-KustoClientRequestProperties.md b/docs/en-US/New-KustoClientRequestProperties.md index 97a81ce..7dd5584 100644 --- a/docs/en-US/New-KustoClientRequestProperties.md +++ b/docs/en-US/New-KustoClientRequestProperties.md @@ -9,7 +9,7 @@ schema: 2.0.0 ## SYNOPSIS -Creates a `ClientRequestProperties` object. +Creates a new `ClientRequestProperties` object. ## SYNTAX @@ -64,8 +64,8 @@ Invoke-KustoQuery 'SELECT top(10) * FROM MyTable' -RequestProperties $requestPro > [!TIP] > -> Out of the supported request properties, this cmdlet only offers `-NoTruncation` (`notruncation`) and `-ServerTimeout` (`servertimeout`). -> The `-Options` parameters is used to add extra options to your request that aren't by default available as a Parameter. +> 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__](https://learn.microsoft.com/en-us/kusto/api/rest/request-properties?view=microsoft-fabric#supported-request-properties) for the additional options. ## PARAMETERS diff --git a/docs/en-US/New-KustoColumnMapping.md b/docs/en-US/New-KustoColumnMapping.md index 3201c99..fd158da 100644 --- a/docs/en-US/New-KustoColumnMapping.md +++ b/docs/en-US/New-KustoColumnMapping.md @@ -9,7 +9,7 @@ schema: 2.0.0 ## SYNOPSIS -Creates a `ColumnMapping` object. +Creates a new `ColumnMapping` object. ## SYNTAX @@ -23,7 +23,9 @@ New-KustoColumnMapping ## DESCRIPTION -The `New-KustoColumnMapping` cmdlet is used to create a new object of type `ColumnMapping`, this object can be later on passed as argument to the [`New-KustoIngestionMapping`](New-KustoIngestionMapping.md) cmdlet. See [__Ingestion mappings__](https://learn.microsoft.com/en-us/kusto/management/mappings?view=microsoft-fabric) for more details. +The `New-KustoColumnMapping` cmdlet is used to create a new object of type `ColumnMapping`, this object can be later on passed as argument to the [`New-KustoIngestionMapping`](New-KustoIngestionMapping.md) cmdlet. + +See [__Ingestion mappings__](https://learn.microsoft.com/en-us/kusto/management/mappings?view=microsoft-fabric) for more details. ## EXAMPLES diff --git a/docs/en-US/New-KustoIngestionMapping.md b/docs/en-US/New-KustoIngestionMapping.md index e0d5ca6..e765787 100644 --- a/docs/en-US/New-KustoIngestionMapping.md +++ b/docs/en-US/New-KustoIngestionMapping.md @@ -9,7 +9,7 @@ schema: 2.0.0 ## SYNOPSIS -Creates a `IngestionMapping` object. +Creates a new `IngestionMapping` object. ## SYNTAX @@ -23,7 +23,7 @@ New-KustoIngestionMapping ## DESCRIPTION -The `New-KustoIngestionMapping` is used to create a new object of type `IngestionMapping` that can be later on passed as argument to the [`Invoke-KustoIngestFromStorage`](Invoke-KustoIngestFromStorage.md), [`Invoke-KustoIngestFromStream`](Invoke-KustoIngestFromStream.md) and [`Set-KustoIngestionMapping`](Set-KustoIngestionMapping.md) commands. +The `New-KustoIngestionMapping` cmdlet is used to create a new object of type `IngestionMapping` that can be later on passed as argument to the [`Invoke-KustoIngestFromStorage`](Invoke-KustoIngestFromStorage.md), [`Invoke-KustoIngestFromStream`](Invoke-KustoIngestFromStream.md) and [`Set-KustoIngestionMapping`](Set-KustoIngestionMapping.md) commands. ## EXAMPLES diff --git a/docs/en-US/Set-KustoBatchingPolicy.md b/docs/en-US/Set-KustoBatchingPolicy.md index 78d735c..871ee27 100644 --- a/docs/en-US/Set-KustoBatchingPolicy.md +++ b/docs/en-US/Set-KustoBatchingPolicy.md @@ -9,7 +9,7 @@ schema: 2.0.0 ## SYNOPSIS -Sets ingestion batching policy on a Kusto Database or Table. +Sets the ingestion batching policy on a Kusto Database or Table. ## SYNTAX @@ -27,7 +27,9 @@ Set-KustoBatchingPolicy ## DESCRIPTION -The `Set-KustoBatchingPolicy` cmdlet is used to alter the batching policy of a Database or specific Table on an Azure Data Explorer Cluster. See [__Ingestion batching policy__](https://learn.microsoft.com/en-us/kusto/management/batching-policy?view=microsoft-fabric) for more details. +The `Set-KustoBatchingPolicy` cmdlet is used to alter the batching policy of a Database or specific Table on an Azure Data Explorer Cluster. + +See [__Ingestion batching policy__](https://learn.microsoft.com/en-us/kusto/management/batching-policy?view=microsoft-fabric) for more details. ## EXAMPLES @@ -52,12 +54,13 @@ $params = @{ MaximumNumberOfItems = 500 MaximumRawDataSizeMB = 1024 } -Set-KustoBatchingPolicy -Database myDb @params +Set-KustoBatchingPolicy @params ``` > [!TIP] > -> When `-Table` isn't specified, the ingestion batching policy is altered at Database level. +> - When `-Table` isn't specified, the ingestion batching policy is altered at Database level. +> - In this example, the database is specified by the database used when you called [`Connect-Kusto`](Connect-Kusto.md#-database). ## PARAMETERS @@ -67,7 +70,7 @@ Specifies the name of the Database for which to alter the ingestion batching pol > [!NOTE] > -> If not supplied, the Database used will be the one specified when you called [`Connect-Kusto`](Connect-Kusto.md). +> If not supplied, the Database used will be the one specified when you called [`Connect-Kusto`](Connect-Kusto.md#-database). ```yaml Type: String diff --git a/docs/en-US/Set-KustoIngestionMapping.md b/docs/en-US/Set-KustoIngestionMapping.md index f6282fe..2b8c6f7 100644 --- a/docs/en-US/Set-KustoIngestionMapping.md +++ b/docs/en-US/Set-KustoIngestionMapping.md @@ -45,14 +45,15 @@ This example demonstrates how to create a new `Json` mapping with name `myNewMap ```powershell $mapping = New-KustoIngestionMapping -Columns $columns -Set-KustoIngestionMapping myNewMapping -Database myDb -Mapping $mapping +Set-KustoIngestionMapping myNewMapping -Mapping $mapping ``` -This example demonstrates how to create a new `Csv` mapping with name `myNewMapping` on `myDb`. +This example demonstrates how to create a new `Csv` mapping with name `myNewMapping`. > [!TIP] > -> When `-Table` isn't specified, the mapping is created at Database level. +> - When `-Table` isn't specified, the mapping is created at Database level. +> - In this example, the database is specified by the database used when you called [`Connect-Kusto`](Connect-Kusto.md#-database). ### Example 3: Update an ingestion mapping on a Database @@ -61,6 +62,8 @@ $mapping = New-KustoIngestionMapping -Columns $columns Set-KustoIngestionMapping myNewMapping -Database myDb -Mapping $mapping -Force ``` +This example updates an existing mapping on a specified database. + ## PARAMETERS ### -Database @@ -69,7 +72,7 @@ Specifies the Kusto Database where the new ingestion mapping is being created. > [!NOTE] > -> If not supplied, the Database used will be the one specified when you called [`Connect-Kusto`](Connect-Kusto.md). +> If not supplied, the Database used will be the one specified when you called [`Connect-Kusto`](Connect-Kusto.md#-database). ```yaml Type: String @@ -77,7 +80,23 @@ Parameter Sets: (All) Aliases: Required: False -Position: 1 +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Force + +If a mapping with same name in the given scope already exists, `.create` fails. Use this switch to execute a `.create-or-alter` control command instead. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -114,7 +133,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 2 +Position: 0 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -137,22 +156,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Force - -If a mapping with same name in the given scope already exists, `.create` fails. Use this switch to execute a `.create-or-alter` control command instead. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -RequestProperties Request properties control how a query or command executes and returns results. If no `ClientRequestProperties` object is supplied this cmdlet will use default properties. @@ -187,7 +190,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 0 +Position: 1 Default value: None Accept pipeline input: False Accept wildcard characters: False