throwInvalidInputException(key,"Invalid property name $property on row $count in column ${index + 1}! You may not use the any of the following characters: + , . ")
throwInvalidInputException(
key,
"Invalid property name $property on row $count in column ${index + 1}! You may not use the any of the following characters: + , . "
)
}
}
}
...
...
@@ -166,30 +183,32 @@ class KafkaTopology(private val settings: SettingsLoader) {
// the -1 ensures, that users can start columns beginning at 1!
validentifier:String=try{
line[identifierIndex-1].let{value->
when(value){
""->{
throwInvalidInputException(
"$count.$identifierIndex",
"The row $count has an empty identifier in column $identifierIndex."
)
}
inmutableSet->{
throwInvalidInputException(
"$count.$identifierIndex",
"The row $count contains a duplicated identifier in column $identifierIndex with another row."
)
}
else->{
mutableSet.add(value)
value
}
when(value){
""->{
throwInvalidInputException(
"$count.$identifierIndex",
"The row $count has an empty identifier in column $identifierIndex."
)
}
inmutableSet->{
throwInvalidInputException(
"$count.$identifierIndex",
"The row $count contains a duplicated identifier in column $identifierIndex with another row."
)
}
else->{
mutableSet.add(value)
value
}
}
}catch(ex:InvalidInputException){
resultMessages.add(Pair(
Pair(ex.key,JsonObject()),
Report(ex.key,"FAILURE",ex.localizedMessage)
))
}
}catch(ex:InvalidInputException){
resultMessages.add(
Pair(
Pair(ex.key,JsonObject()),
Report(ex.key,"FAILURE",ex.localizedMessage)
)
)
continue
}
valkeyValueMap=json{
...
...
@@ -227,9 +246,24 @@ class KafkaTopology(private val settings: SettingsLoader) {
valresult=excelMapper(key,value)
Pair(result,Report(key,"SUCCESS","Transformed table data into ${result.count()} records."))