我们可以将月份数字转换为月份名称。我可以看到一个名为月份名称的函数
https://impala.apache.org/docs/build/html/topics/impala_datetime_functions.html#datetime_functions__month
但是它不起作用。
您可以转换为Unix时间戳并使用:
from_unixtime(col, 'MMM')
您应该使用日期字段来获取月份名称,但是如果您坚持使用月份号列,则可以使用decode。也可以使用case语句来表达]
decode
case
select decode(month_number, 1, "Jan", 2, "Feb", 3, "Mar".....) as month_name from your_table;