Last active
September 25, 2019 13:03
-
-
Save randyzwitch/8b30fa7d302431cb5fcc8576519f9b1e to your computer and use it in GitHub Desktop.
Limited Select Statement SQL Server to OmnISci
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 \ | |
-d com.microsoft.sqlserver.jdbc.SQLServerDriver \ | |
-u admin -p HyperInteractive -db omnisci --port 6274 -t customers_nopii \ | |
-su sqlserver_user -sp sqlserver_password \ | |
-c "jdbc:sqlserver://localhost:1433;DatabaseName=prod" \ | |
-ss "select customerid, service_address, address_geom.STAsText() as address_geom from customers;" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment