Skip to content

Commit

Permalink
We can now execute a specified script.
Browse files Browse the repository at this point in the history
  • Loading branch information
kurron committed Sep 17, 2018
1 parent 5b8f0c0 commit 0821b66
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
*.class
config
19 changes: 19 additions & 0 deletions connection-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash

# Runs the specified Snowflake script using the specified configuration file

CONFIGURATION=${1:-${PWD}/config}
SCRIPT=${2:-${PWD}/create-warehouse.sql}

#--env SNOWSQL_PWD=${SNOWSQL_PWD}
#--rolename ${ROLE_NAME} \

CMD="docker run --interactive \
--name snowsql \
--rm \
--tty \
--volume ${CONFIGURATION}:/mnt/config:ro \
--volume ${SCRIPT}:/mnt/script.sql:ro \
snowsql:latest --config /mnt/config --filename /mnt/script.sql"
echo $CMD
$CMD

0 comments on commit 0821b66

Please sign in to comment.