in packages/azure-kusto-ingest/src/columnMappings.ts [50:73]
public toApiMapping(): ApiColumnMapping {
const result: ApiColumnMapping = {
Column: this.columnName,
};
if (this.cslDataType) {
result.DataType = this.cslDataType;
}
if (this.Properties) {
result.Properties = {};
for (const key in this.Properties) {
if (Object.prototype.hasOwnProperty.call(this.Properties, key)) {
const typedKey = key as keyof MappingProperties;
const property = this.Properties[typedKey];
// We don't do if (property) because we '0' is a legitimate value
if (property !== undefined && property !== null) {
result.Properties[typedKey] = property.toString();
}
}
}
}
return result;
}