Environment: Tableau Desktop 2022.3, M1 MacBook Pro, macOS
12.6.3
Connecting Tableau Desktop to
most data sources should be a straightforward process. However, it seems that connecting to Snowflake
can present some complications. This
blog will detail the procedure, which I hope will save you some time and unnecessary
headache.
When connecting Tableau
Desktop to Snowflake, Tableau Desktop will ask to download Snowflake ODBC
Driver.
Issue: After downloading the driver, restarting the laptop, & connecting to Snowflake, Tableau Desktop keeps asking you to download the Snowflake
driver.
Tableau Community has a
thread about this issue. Here're the steps that I've found to make it work.
1) Install iODBC
since Snowflake ODBC driver for macOS requires this.
2) Configure ODBC
driver for macOS at system DSN.
a.
Click on
Finder\Go to Folder\, and type in /Library/ODBC/.
b.
Go to folder MacintoshHD\Library\ODBC\
and open file odbcinst.ini
c.
Add these 3 lines and save the odbcinst.ini file.
Snowflake = Installed
[Snowflake]
Driver =
/opt/snowflake/snowflakeodbc/lib/universal/libSnowflake.dylib
d.
Issue: When you save the odbcinst.ini file, you
might encounter a message that you do not have write permission for odbcinst.ini
file.
Solution for issue in step d:
e.
Go to folder MacintoshHD\Library\ODBC,
right click on ODBC folder and select ‘Get Info’. The ODBC Info screen will pop up.
f.
Click on the lock
icon in lower right side to unlock ‘Sharing & Permissions’ section that
will allow you to change the Read & Write privilege.
g.
Click on the ‘wheel’
section to highlight it, then click the ‘+’ sign. Notice the lock icon has been changed to
opened.
h.
This screen will
pop up, select all (Administrators, it, your name, and User Backup) and click the 'Select' button.
i.
Change all users and groups to have 'Read & Write' privilege, with the exception of 'everyone' which should have 'Read only' privilege.
j.
Click on the lock
icon to lock the permissions. Close the ‘ODBC
Info’ screen.
Completing steps e. to j. will allow ODBC Folder to
have 'Read & Write' privilege.
k.
Repeat steps f.
to j. for files odbc.ini and odbcinst.ini in folder MacintoshHD\Library\ODBC\
Step k. is needed because granting 'Read
& Write' privilege to ODBC Folder doesn’t mean the privilege will flow down
to the files within the folder. Both files
odbc.ini and odbcinst.ini will also need to be granted 'Read & Write'
privilege.
l. Repeat steps b.
and c. to modify and save the odbcinst.ini file. You should now be able to save the change to odbcinst.ini file.
m. Open file odbc.ini.
Since this file is empty, it should be changed as below:
[ODBC Data Sources]
Snowflake = Snowflake
[Snowflake]
Driver
= /opt/snowflake/snowflakeodbc/lib/universal/libSnowflake.dylib
After completing the steps above, you should be ready to
connect from Tableau Desktop to Snowflake.
Open Tableau Desktop and connect to Snowflake. In 'Server' section, enter your company Snowflake account link and in 'Authentication', select 'Sign in using OAuth'. Then click 'Sign In' button. Finally, you should be able to connect to Snowflake environment.
No comments:
Post a Comment