我使用sqoop将数据从MySQL导入到hdfs,并将其作为片材文件,在该文件中由Impala使用。将MySQL日期类型转换为Impala时间戳存在问题。执行compute stats table或select *时的Impala错误消息是:has an incompatible type withActual type:
这似乎是我面临的一个有趣的bug/问题。我使用的是Impala和HUE,它们属于CDH 5.8 (Cloudera Distribution for Hadoop)。, CAST((from_unixtime(UNIX_TIMESTAMP('1709.02.02','yyyy.MM.dd'))) as TIMESTAMP) as DateTimestampdatestring datetimestamp
当我通过impala查询时,我将一个日期字段转换为hive中的时间戳为from_unixtime(unix_timestamp(), 'yyyy-MM-dd HH:mm:ss') as timestamp不仅我创建的列每个时间戳字段都要转换为GMT格式。请帮我处理sql查询或spark/scala代码,我试过用这个,它对我很有帮助。