external help file | Module Name | online version | schema |
---|---|---|---|
PowerShellKusto.dll-Help.xml |
PowerShellKusto |
2.0.0 |
Creates a new ColumnMapping
object.
New-KustoColumnMapping
[-Name] <String>
[[-Type] <ColumnType>]
[[-Properties] <Hashtable>]
[<CommonParameters>]
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
cmdlet.
See Ingestion mappings for more details.
$columns = @(
New-KustoColumnMapping event_time -Properties @{ Ordinal = 0 }
New-KustoColumnMapping event_name -Properties @{ Ordinal = 1 }
New-KustoColumnMapping event_type -Properties @{ Ordinal = 2 }
New-KustoColumnMapping ingestion_time -Properties @{ ConstValue = '2023-01-01T10:32:00' }
New-KustoColumnMapping source_location -Properties @{ Transform = 'SourceLocation' })
Demonstrates how to create columns for a new CSV mapping.
$columns = @(
New-KustoColumnMapping event_timestamp -Properties @{Path = '$.Timestamp' }
New-KustoColumnMapping event_name -Properties @{ Path = '$.Event.Name' }
New-KustoColumnMapping event_type -Properties @{ Path = '$.Event.Type' }
New-KustoColumnMapping source_uri -Properties @{ Transform = 'SourceLocation' }
New-KustoColumnMapping source_line -Properties @{ Transform = 'SourceLineNumber' }
New-KustoColumnMapping event_time -Properties @{ Path = '$.Timestamp'; Transform = 'DateTimeFromUnixMilliseconds' }
New-KustoColumnMapping ingestion_time -Properties @{ ConstValue = '2021-01-01T10:32:00' }
New-KustoColumnMapping full_record -Properties @{ Path = '$' })
Demonstrates how to create columns for a new JSON mapping.
Specifies the Target column name in the table.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Property-bag containing properties specific for each mapping as described in each specific mapping type page.
Type: Hashtable
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the Datatype with which to create the mapped column if it doesn't already exist in the table.
Type: ColumnType
Parameter Sets: (All)
Aliases:
Accepted values: bool, datetime, decimal, dynamic, guid, int, long, double, string, timespan
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.