Created
June 20, 2016 17:20
-
-
Save piercelamb/5c4b4a1d3eec53681540d46723108c70 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
memSqlContext.getMemSQLCluster.withMasterConn(conn => { | |
conn.withStatement(stmt => { | |
stmt.execute(s"CREATE DATABASE IF NOT EXISTS adLogs") | |
stmt.execute(s"DROP TABLE IF EXISTS adLogs.adImpressions") | |
stmt.execute( | |
“CREATE TABLE adLogs.adImpressions | |
(timestamp bigint, | |
publisher varchar(15), | |
advertiser varchar(15), | |
website varchar(20), | |
geo varchar(4), | |
bid double, | |
cookie varchar(20), | |
KEY (`timestamp`) USING CLUSTERED COLUMNSTORE, | |
SHARD KEY (timestamp))”) | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment