是否有一个相当于“SHOW TABLES”的阿帕奇猪? [英] Is there an apache pig equivalent of "SHOW TABLES"?

查看:96
本文介绍了是否有一个相当于“SHOW TABLES”的阿帕奇猪?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Hadoop数据存储,我在Pig中访问,并没有很多文档,另外我是Pig的新手,所以我正在寻找Pig的SHOW TABLES。当我连接到一个MySQL数据库时,我可以做到这一点,并获得有关数据的一般意义;我发现了几个教程,但没有任何关键。如果没有,有没有其他方法可以让我自己定位到一个我一无所知的Hadoop数据存储?



ETA:这是在交互模式下运行Pig时,而不是加载脚本。可能很明显,但我想我应该提到它。 Pig没有表格的概念。它可以读取HDFS文件系统上的任何文件,并将解析结果存储在关系中。 注意你也可以运行HDFS文件系统来自grunt shell的命令



最好先熟悉HDFS,并确保您可以先轻松浏览文件系统你可以找到你想用Pig处理的数据。

I have a Hadoop data store I'm accessing in Pig and not a lot of documentation on it, plus I'm new to Pig, so I am looking for the Pig equivalent of "SHOW TABLES". When I have a connection to a MySQL db I can do this and get a general sense of what data is in there; I have found several tutorials but nothing on point. If not, is there some other way to orient myself to a Hadoop data store I know nothing about?

ETA: This would be when running Pig in interactive mode, rather than loading a script. Probably obvious, but I thought I should mention it.

解决方案

Pig doesn't have a concept of tables. It can read any file that is on your HDFS filesystem and stores the parsed result in a relation.

Note that you can also run HDFS filesystem commands from the grunt shell

It's probably best you familiarise yourself with HDFS first and make sure you can comfortably navigate the filesystem first so you can find what data you want to process with Pig.

这篇关于是否有一个相当于“SHOW TABLES”的阿帕奇猪?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆