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
--201906 and 201907 files have extra blank column | |
CREATE TABLE baywheels_tripdata_extracol( | |
duration_sec INTEGER, | |
start_time TIMESTAMP, | |
end_time TIMESTAMP, | |
start_station_id SMALLINT, | |
start_station_name TEXT ENCODING DICT, | |
start_station_latitude FLOAT, | |
start_station_longitude FLOAT, | |
end_station_id SMALLINT, |
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
omnisql> copy baywheels_tripdata from 's3://baywheels-data/201905-baywheels-tripdata.csv.zip'; | |
Result | |
Loaded: 182163 recs, Rejected: 0 recs in 2.440000 secs | |
omnisql> copy baywheels_tripdata from 's3://baywheels-data/201906-baywheels-tripdata.csv.zip'; | |
Result | |
Loader truncated due to reject count. Processed : 0 recs, Rejected: 191772 recs in 8.323000 secs |
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
--add column bike_share_for_all_trip, which starts with Jan 2018 file | |
ALTER TABLE baywheels_tripdata ADD COLUMN bike_share_for_all_trip TEXT ENCODING DICT; |
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
omnisql> copy baywheels_tripdata from 's3://baywheels-data/201801-fordgobike-tripdata.csv.zip'; | |
Result | |
Loaded: 0 recs, Rejected: 94802 recs in 5.752000 secs |
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
--define table for 2017 schema | |
CREATE TABLE baywheels_tripdata( | |
duration_sec INTEGER, | |
start_time TIMESTAMP, | |
end_time TIMESTAMP, | |
start_station_id SMALLINT, | |
start_station_name TEXT ENCODING DICT, | |
start_station_latitude FLOAT, | |
start_station_longitude FLOAT, | |
end_station_id SMALLINT, |
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
#run in OmniSci before import to define table | |
create table customers_nopii( | |
customerid TEXT ENCODING DICT, | |
service_address TEXT ENCODING DICT, | |
address_geom POLYGON | |
) | |
#export custom query to OmniSci | |
java -cp /opt/omnisci/bin/mapd-1.0-SNAPSHOT-jar-with-dependencies.jar:/path/mssql-jdbc-7.4.1.jre8.jar \ | |
com.mapd.utility.SQLImporter \ |
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
java -cp /opt/omnisci/bin/mapd-1.0-SNAPSHOT-jar-with-dependencies.jar:/path/mssql-jdbc-7.4.1.jre8.jar \ | |
com.mapd.utility.SQLImporter \ | |
-d com.microsoft.sqlserver.jdbc.SQLServerDriver \ | |
-u admin -p HyperInteractive -db omnisci --port 6274 -t customers \ | |
-su sqlserver_user -sp sqlserver_password \ | |
-c "jdbc:sqlserver://localhost:1433;DatabaseName=prod" \ | |
-ss "select * from dbo.customers" |
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
$ java -version | |
java version "1.8.0_181" | |
Java(TM) SE Runtime Environment (build 1.8.0_181-b13) | |
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode) |
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
[ | |
{ | |
"customStyles": { | |
"colors": { | |
"solid": [ | |
"#ea5545", | |
"#f46a9b", | |
"#ef9b20", | |
"#ede15b", | |
"#bdcf32", |
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
_ | |
_ _ _(_)_ | Documentation: https://docs.julialang.org | |
(_) | (_) (_) | | |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help. | |
| | | | | | |/ _` | | | |
| | |_| | | | (_| | | Version 1.1.0 (2019-01-21) | |
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release | |
|__/ | | |
julia> using OmniSci, DataFrames |