Skip to content

Commit

Permalink
done with docs
Browse files Browse the repository at this point in the history
  • Loading branch information
santisq committed Dec 24, 2024
1 parent f4abd1f commit d6d760b
Show file tree
Hide file tree
Showing 10 changed files with 85 additions and 72 deletions.
4 changes: 3 additions & 1 deletion docs/en-US/Connect-Kusto.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
46 changes: 22 additions & 24 deletions docs/en-US/Invoke-KustoControlCommand.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
9 changes: 5 additions & 4 deletions docs/en-US/Invoke-KustoIngestFromStorage.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions docs/en-US/Invoke-KustoIngestFromStream.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
12 changes: 8 additions & 4 deletions docs/en-US/Invoke-KustoQuery.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions docs/en-US/New-KustoClientRequestProperties.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ schema: 2.0.0

## SYNOPSIS

Creates a `ClientRequestProperties` object.
Creates a new `ClientRequestProperties` object.

## SYNTAX

Expand Down Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions docs/en-US/New-KustoColumnMapping.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ schema: 2.0.0

## SYNOPSIS

Creates a `ColumnMapping` object.
Creates a new `ColumnMapping` object.

## SYNTAX

Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions docs/en-US/New-KustoIngestionMapping.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ schema: 2.0.0

## SYNOPSIS

Creates a `IngestionMapping` object.
Creates a new `IngestionMapping` object.

## SYNTAX

Expand All @@ -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

Expand Down
13 changes: 8 additions & 5 deletions docs/en-US/Set-KustoBatchingPolicy.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand All @@ -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

Expand All @@ -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
Expand Down
Loading

0 comments on commit d6d760b

Please sign in to comment.