Hi all,
         I have a tables in hive of product_hits and company_hits i want to
export the data to my web application  which is build on ruby on rails
framework to show this data in my app.

table description are as follows

-- This table will store the hits (data from the server log) for each
product
CREATE TABLE product_hits (
  ip STRING, ident STRING, user STRING, time STRING,
  method STRING, resource STRING, protocol STRING, status INT,
  length INT, referer STRING, agent STRING,
  product_id INT,
  company_id INT,
  ip_country STRING,
  product_name STRING,
  company_name STRING
)
ROW FORMAT DELIMITED FIELDS TERMINATED BY "\t" LINES TERMINATED BY "\n"
STORED AS TEXTFILE;

-- As above, except for companies
CREATE TABLE company_hits (
  ip STRING, ident STRING, user STRING, time STRING,
  method STRING, resource STRING, protocol STRING, status INT,
  length INT, referer STRING, agent STRING,
  company_id INT,
  ip_country STRING,
  company_name STRING
)
ROW FORMAT DELIMITED FIELDS TERMINATED BY "\t" LINES TERMINATED BY "\n"
STORED AS TEXTFILE;


Thanks,
prakash

Reply via email to