Skip to content

Latest commit

 

History

History
222 lines (158 loc) · 5.88 KB

Set-KustoIngestionMapping.md

File metadata and controls

222 lines (158 loc) · 5.88 KB
external help file Module Name online version schema
PowerShellKusto.dll-Help.xml
PowerShellKusto
2.0.0

Set-KustoIngestionMapping

SYNOPSIS

Creates or updates an ingestion mapping that can be associated with a specific format and a specific table or database.

SYNTAX

Set-KustoIngestionMapping
    [-Name] <String>
    [[-Table] <String>]
    [[-Database] <String>]
    -Mapping <IngestionMapping>
    [-Force]
    [-OutputType <OutputType>]
    [-RequestProperties <ClientRequestProperties>]
    [<CommonParameters>]

DESCRIPTION

The Set-KustoIngestionMapping cmdlet can be used to create or update an ingestion mapping that can be associated with a specific format and a specific table or database. For more information see .create ingestion mapping command and .create-or-alter ingestion mapping command.

EXAMPLES

Example 1: Creates a new ingestion mapping on a Table

$mapping = New-KustoIngestionMapping -Columns $columns -Kind Json
Set-KustoIngestionMapping myNewMapping -Table myTable -Mapping $mapping

This example demonstrates how to create a new Json mapping with name myNewMapping on myTable in a Database specified by Connect-Kusto -Database.

Example 2: Creates a new ingestion mapping on a Database

$mapping = New-KustoIngestionMapping -Columns $columns
Set-KustoIngestionMapping myNewMapping -Mapping $mapping

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.
  • In this example, the database is specified by the database used when you called Connect-Kusto.

Example 3: Update an ingestion mapping on a Database

$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

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.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
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.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Mapping

This parameter indicates how to map data from the source file to the actual columns in the table. You can define the format value with the relevant mapping type.

To create a new mapping object, checkout New-KustoIngestionMapping and New-KustoColumnMapping documentations.

See data mappings and Class KustoIngestionProperties for more information.

Type: IngestionMapping
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name

The name for the ingestion mapping.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OutputType

Determines the output type this cmdlet will produce. The default value is PSObject.

Type: OutputType
Parameter Sets: (All)
Aliases:
Accepted values: PSObject, Json, Csv, DataTable, Html

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.

Note

You can create new request properties using New-KustoClientRequestProperties.

Type: ClientRequestProperties
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Table

Specifies the Table where the new ingestion mapping is being created.

Note

This parameter is optional. If not specified, the ingestion mapping is created on Database level.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters. For more information, see about_CommonParameters.

INPUTS

None

OUTPUTS

System.Management.Automation.PSObject

System.String

System.Data.DataTable

NOTES

RELATED LINKS

.create ingestion mapping command

.create-or-alter ingestion mapping command