private String getTargetColumnName ( String sourceColumnName , String alias ) { String targetColumnName = alias ; Schema obj = this . getMetadataColumnMap ( ) . get ( sourceColumnName . toLowerCase ( ) ) ; if ( obj == null ) { targetColumnName = ( targetColumnName == null ? "unknown" + this . unknownColumnCounter : targetColumnName ) ; this . unknownColumnCounter ++ ; } else { targetColumnName = ( StringUtils . isNotBlank ( targetColumnName ) ? targetColumnName : sourceColumnName ) ; } targetColumnName = this . toCase ( targetColumnName ) ; return Utils . escapeSpecialCharacters ( targetColumnName , ConfigurationKeys . ESCAPE_CHARS_IN_COLUMN_NAME , "_" ) ; }
Get target column name if column is not found in metadata then name it as unknown column If alias is not found target column is nothing but source column