我是靠谱客的博主 成就便当,这篇文章主要介绍[Hive - LanguageManual] VirtualColumns,现在分享给大家,希望可以做个参考。

  • Virtual Columns
    • Simple Examples

Virtual Columns

Hive 0.8.0 provides support for two virtual columns:

One is INPUT__FILE__NAME, which is the input file's name for a mapper task.

the other is BLOCK__OFFSET__INSIDE__FILE, which is the current global file position.

For block compressed file, it is the current block's file offset, which is the current block's first byte's file offset.

Simple Examples

select INPUT__FILE__NAME, key, BLOCK__OFFSET__INSIDE__FILE from src;

select key, count(INPUT__FILE__NAME) from src group by key order by key;

select * from src where BLOCK__OFFSET__INSIDE__FILE > 12000 order by key;

转载于:https://www.cnblogs.com/tmeily/p/4249954.html

最后

以上就是成就便当最近收集整理的关于[Hive - LanguageManual] VirtualColumns的全部内容,更多相关[Hive内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(61)

评论列表共有 0 条评论

立即
投稿
返回
顶部