title: Is it possible to have multiple hive tables represented within the same HDFS directory structure?
body: <p>Is it possible to have multiple hive tables represented within the same HDFS directory structure? In other words, is there a way to have multiple hive tables pointing to same/overlapping HDFS paths?</p>
  
  <p>Here is my situation:</p>
  
  <p>I have a table named "mytable", located in hdfs:/tables/mytable</p>
  
  <pre><code>CREATE EXTERNAL TABLE mytable
  (
  id int,
  ...
  [a whole bunch of columns]
  ...
  PARTITIONED BY (logname STRING)
  STORED AS [I-do-not-know-what-just-yet]
  LOCATION 'hdfs:/tables/mytable';
  </code></pre>
  
  <p>So, HDFS will look like:</p>
  
  <pre><code>hdfs:/tables/mytable/logname=tarzan/....
  hdfs:/tables/mytable/logname=jane/....
  hdfs:/tables/mytable/logname=whoa/....
  </code></pre>
  
  <p>Is it possible to have a hive table, named "tarzan", located in hdfs:/tables/mytable/logname=tarzan ?  Same with hive table "jane", located in hdfs:/tables/mytable/logname=jane, etc.</p>
  
  <p>The tarzan, jane, whoa, etc sub-tables share some columns (timestamp, ip_address, country, user_id, and some others), but there will also be a lot of columns that they do not have in common.</p>
  
  <p>Is there a way to store this data once in HDFS, and use it for multiple tables as I described above?  Furthermore, is there a way to store the data in an efficient way, since many of the tables will have columns that are not in common?  Would a file format like RCFILE or PARQUET work in this case?</p>
  
  <p>Thanks so much for any hints or help anyone can provide,</p>