public static String getDatabaseName ( Record metadataRecord ) throws HiveStageCheckedException { if ( metadataRecord . has ( SEP + DATABASE_FIELD ) ) { String dbName = metadataRecord . get ( SEP + DATABASE_FIELD ) . getValueAsString ( ) ; return dbName . isEmpty ( ) ? DEFAULT_DBNAME : dbName ; } throw new HiveStageCheckedException ( Errors . HIVE_17 , DATABASE_FIELD , metadataRecord ) ; }
Get Database Name from the metadata record .