forked from D-Net/dnet-hadoop
8 lines
486 B
MySQL
8 lines
486 B
MySQL
|
CREATE TABLE IF NOT EXISTS ${usageStatsDB}.piwiklogdistinct(source INT, id_visit STRING, country STRING,
|
||
|
action STRING, url STRING, entity_id STRING, source_item_type STRING, timestamp STRING,
|
||
|
referrer_name STRING, agent STRING) clustered by (source, id_visit, action, timestamp, entity_id)
|
||
|
into 100 buckets stored as orc tblproperties('transactional'='true');
|
||
|
|
||
|
INSERT INTO ${usageStatsDB}.piwiklogdistinct
|
||
|
SELECT DISTINCT * FROM ${usageRawDataDB}.piwiklog WHERE entity_id is not null;
|