.alter ingestion mapping.alter ingestion mapping

更改与特定表和特定格式关联的现有引入映射(完全映射替换)。Alters an existing ingestion mapping that is associated with a specific table and a specific format (full mapping replace).

语法Syntax

.alter table TableName ingestion MappingKind mapping MappingName MappingFormattedAsJson .alter table TableName ingestion MappingKind mapping MappingName MappingFormattedAsJson

备注

  • 此映射可以通过引入命令按其名称引用,而不必将完整映射指定为命令的一部分。This mapping can be referenced by its name by ingestion commands, instead of specifying the complete mapping as part of the command.
  • MappingKind 的有效值为:CSVJSONavroparquetorcValid values for MappingKind are: CSV, JSON, avro, parquet, and orc.

示例Example

.alter table MyTable ingestion csv mapping "Mapping1"
'['
'   { "column" : "rownumber", "DataType":"int", "Properties":{"Ordinal":"0"}},'
'   { "column" : "rowguid", "DataType":"string", "Properties":{"Ordinal":"1"} }'
']'

.alter table MyTable ingestion json mapping "Mapping1"
'['
'   { "column" : "rownumber", "Properties":{"Path":"$.rownumber"}},'
'   { "column" : "rowguid", "Properties":{"Path":"$.rowguid"}}'
']'

示例输出Sample output

名称Name 种类Kind 映射Mapping
mapping1mapping1 CSVCSV [{"Name":"rownumber","DataType":"int","CsvDataType":null,"Ordinal":0,"ConstValue":null},{"Name":"rowguid","DataType":"string","CsvDataType":null,"Ordinal":1,"ConstValue":null}]