1

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

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;

谁能帮我在蜂巢中编写类似的查询。

4

1 回答 1

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

链接2

于 2015-12-09T05:44:25.363 回答