in connector/src/main/scala/com/microsoft/kusto/spark/datasink/SparkIngestionProperties.scala [61:103]
def toIngestionProperties(database: String, table: String): IngestionProperties = {
val ingestionProperties = new IngestionProperties(database, table)
val additionalProperties = new util.HashMap[String, String]()
if (this.flushImmediately) {
ingestionProperties.setFlushImmediately(true)
}
if (this.dropByTags != null) {
ingestionProperties.setDropByTags(this.dropByTags)
}
if (this.ingestByTags != null) {
ingestionProperties.setIngestByTags(this.ingestByTags)
}
if (this.additionalTags != null) {
ingestionProperties.setAdditionalTags(this.additionalTags)
}
if (this.ingestIfNotExists != null) {
ingestionProperties.setIngestIfNotExists(this.ingestIfNotExists)
}
if (this.creationTime != null) {
additionalProperties.put("creationTime", this.creationTime.toString)
}
if (this.csvMapping != null) {
additionalProperties.put("ingestionMapping", this.csvMapping)
additionalProperties.put("ingestionMappingType", IngestionMappingKind.CSV.getKustoValue)
}
if (this.csvMappingNameReference != null) {
ingestionProperties.setIngestionMapping(
new IngestionMapping(
this.csvMappingNameReference,
IngestionMapping.IngestionMappingKind.CSV))
}
ingestionProperties.setAdditionalProperties(additionalProperties)
ingestionProperties
}