Community based Snowflake Dremio connector made using the ARP framework.
440

This is a community based Snowflake Dremio connector made using the ARP framework. Check Dremio Hub for more examples and ARP Docs for documentation.
Dremio delivers lightning fast query speed and a self-service semantic layer operating directly against your data lake storage and other sources. No moving data to proprietary data warehouses or creating cubes, aggregation tables and BI extracts. Just flexibility and control for Data Architects, and self-service for Data Consumers.

docker run -p 9047:9047 -p 31010:31010 narendrans/dremio-snowflake
jdbc:snowflake://<account_name>.snowflakecomputing.com/?param1=value¶m2=value. More details.jdbc:snowflake://account.us-east-1.snowflakecomputing.com?warehouse=compute_wh&private_key_file=/Users/naren/Desktop/rsa_key.pemmvn clean install -DskipTests. If you want to run the tests, add the JDBC jar to your local maven repo along with environment variables that are required. Check the basic test example for more details.Note: You can pull the pre-built docker images: https://hub.docker.com/r/narendrans/dremio-snowflake
Dockerfile:
FROM dremio/dremio-oss:4.0.0
USER root
WORKDIR /tmp
RUN wget http://apache.osuosl.org/maven/maven-3/3.6.1/binaries/apache-maven-3.6.1-bin.zip && \
unzip apache-maven-3.6.1-bin.zip && \
git clone https://github.com/narendrans/dremio-snowflake.git && cd dremio-snowflake && \
export PATH=$PATH:/tmp/apache-maven-3.6.1/bin && \
mvn clean install -DskipTests && \
cp target/dremio-snowflake*.jar /opt/dremio/jars && \
cd /opt/dremio/jars && wget https://repo1.maven.org/maven2/net/snowflake/snowflake-jdbc/3.9.1/snowflake-jdbc-3.9.1.jar && \
chown dremio *snowflake*.jar && rm -rf ~/.m2 && rm -rf /tmp/*
WORKDIR /opt/dremio
USER dremio
Build:
docker build . -t dremio-snowflake
Run:
docker run -p 9047:9047 -p 31010:31010 dremio-snowflake
To debug pushdowns for queries set the following line in logback.xml
<logger name="com.dremio.exec.store.jdbc">
<level value="${dremio.log.level:-trace}"/>
</logger>
You can then notice lines like below in server.log file after which you can revist the YAML file to add pushdowns based on Snowflake SQL Reference:
- 2019-07-11 18:56:24,001 [22d879a7-ce3d-f2ca-f380-005a88865700/0:foreman-planning] DEBUG c.d.e.store.jdbc.dialect.arp.ArpYaml - Operator / not supported. Aborting pushdown.
You can also take a look at the planning tab/visualized plan of the profile to determine if everything is pushed down or not.
PRs are welcome. When submitting a PR make sure of the following:
If you see the following trace in dremio:
Caused by: java.lang.RuntimeException: Failed to locate or create the cache directory: /home/dremio/.cache/snowflake
at net.snowflake.client.core.FileCacheManager.build(FileCacheManager.java:159) ~[snowflake-jdbc-3.8.7.jar:3.8.7]
at net.snowflake.client.core.SFTrustManager.<clinit>(SFTrustManager.java:197) ~[snowflake-jdbc-3.8.7.jar:3.8.7]
... 21 common frames omitted
You should then set the File cache environment variables documented here
export SF_TEMPORARY_CREDENTIAL_CACHE_DIR=<path>
export SF_OCSP_RESPONSE_CACHE_DIR=<path>
To set them as JAVA properties, add them to the conf/dremio-env file
DREMIO_JAVA_SERVER_EXTRA_OPTS='-Dnet.snowflake.jdbc.temporaryCredentialCacheDir=/tmp -Dnet.snowflake.jdbc.ocspResponseCacheDir=/tmp'
Content type
Image
Digest
Size
809.7 MB
Last updated
about 7 years ago
docker pull narendrans/dremio-snowflake