无法在Qubole中创建类似于mysql的表

时间:2015-12-09 05:26:24

标签: mysql hive qubole

我想在Qubole中创建一个类似于在Mysql中创建的表的外部表。在mysql中查询create table是:

CREATE TABLE `mytable` (
 `id` varchar(50) NOT NULL,
 `v_count` int(11) DEFAULT NULL,
 `l_visited` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
 `f_visited` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

任何人都可以帮我在hive中编写类似的查询。

1 个答案:

答案 0 :(得分:1)

尝试这种方式:

CREATE TABLE page_view(viewTime INT, userid BIGINT,
                page_url STRING, referrer_url STRING,
                ip STRING COMMENT 'IP Address of the User')
COMMENT 'This is the page view table'
PARTITIONED BY(dt STRING, country STRING)
STORED AS SEQUENCEFILE;

请点击此链接: link1

link2