Skip to content

Instantly share code, notes, and snippets.

@id
Last active September 19, 2024 16:41
Show Gist options
  • Save id/476844f8bf1f328088eae08bca8c0cb1 to your computer and use it in GitHub Desktop.
Save id/476844f8bf1f328088eae08bca8c0cb1 to your computer and use it in GitHub Desktop.
install-snowflake-odbc.sh
#!/usr/bin/env bash
set -xeuo pipefail
apt update && apt install -yyq unixodbc-dev odbcinst wget unixodbc libreadline8
wget -nc 'https://sfc-repo.snowflakecomputing.com/odbc/linux/3.3.2/snowflake-odbc-3.3.2.x86_64.deb'
dpkg -i snowflake-odbc-3.3.2.x86_64.deb
apt install -f
ODBC_INST_LIB=/usr/lib/x86_64-linux-gnu/libodbcinst.so
sed -i -e "s#^ODBCInstLib=.*#ODBCInstLib=\$ODBC_INST_LIB#" /usr/lib/snowflake/odbc/lib/simba.snowflake.ini
sed -i -e "s#SF_ACCOUNT#\${SFACCOUNT}#" /etc/odbc.ini
cat >>/etc/odbc.ini <<EOF
[ODBC Data Sources]
snowflake = SnowflakeDSIIDriver
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment