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

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

问题描述

我有一个在 Pig 中访问的 Hadoop 数据存储,但没有太多相关文档,而且我是 Pig 的新手,所以我正在寻找与SHOW TABLES"等效的 Pig.当我连接到 MySQL 数据库时,我可以这样做并大致了解那里的数据;我找到了几个教程,但没有任何内容.如果没有,是否有其他方法可以让我定位到我一无所知的 Hadoop 数据存储?

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:这将是在交互模式下运行 Pig 时,而不是加载脚本.可能很明显,但我想我应该提一下.

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 没有表格的概念.它可以读取 HDFS 文件系统上的任何文件并将解析结果存储在关系中.

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.

请注意,您还可以从 grunt shell 运行 HDFS 文件系统 命令

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

最好先熟悉 HDFS,并确保首先可以轻松浏览文件系统,以便找到要使用 Pig 处理的数据.

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天全站免登陆