Search code examples
hadoopapache-pig

Is there an apache pig equivalent of "SHOW TABLES"?


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.


Solution

  • 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.