external help file | Module Name | online version | schema |
---|---|---|---|
PowerShellKusto.dll-Help.xml |
PowerShellKusto |
2.0.0 |
Creates or updates an ingestion mapping that can be associated with a specific format and a specific table or database.
Set-KustoIngestionMapping
[-Name] <String>
[[-Table] <String>]
[[-Database] <String>]
-Mapping <IngestionMapping>
[-Force]
[-OutputType <OutputType>]
[-RequestProperties <ClientRequestProperties>]
[<CommonParameters>]
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.
$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
.
$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
.
$mapping = New-KustoIngestionMapping -Columns $columns
Set-KustoIngestionMapping myNewMapping -Database myDb -Mapping $mapping -Force
This example updates an existing mapping on a specified 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
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
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
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
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
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
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
This cmdlet supports the common parameters. For more information, see about_CommonParameters.