定义函数PlatformConvert:
实现传入hive表中string类型字段,通过查询中间表,返回int类型主键id值
publicclass PlatformConvert extends UDF{ public IntWritable evaluate(Text s) throws Exception{ if(s==null){ returnnull; } PlatformDimension platformDimension = new PlatformDimension(s.toString()); IDimensionConverter |