I was on the dog field the other day, and the topic was words added to the English language over the last few years, particularly if they’ve been helpful. I offered a few which worked for me: We had…
Excel is still widely used by businesses and BI teams in order to have a look at the data, perform analysis and checks. You can connect a workbook to a database of your choice via ODBC and retrieve data from the source. Being a product developed by Microsoft, it runs very smoothly on Windows, and it is pretty easy to use and to connect to a database, such as Redshift. But the same can not be said when it comes to running Excel on macOS.
In this guide I will walk you through the setup and by the end of it you should be able to query Redshift data from Excel.
We will need 4 things:
The following configuration files can be set up at the system and/or the user level. We will create a user level configuration because we’re going to do something hacky, and it’s better to do so at the user level.
odbc.ini
Write the following into the file
odbcinst.ini
Write the following into the file
After you installed the driver (see prerequisites) you should have a folder /opt/amazon/redshift/lib/
with libamazonredshiftodbc.dylib
file inside it. Due to macOS nature (sandbox) Excel can not use drivers in any location other than in its frameworks folder, hence we will copy the driver there.
To do that open the terminal and run the following command (this assumes Excel is installed in the default location):
After it is done, set the Driver
field in odbc.ini
and odbcinst.ini
files we’ve written earlier to be the absolute path (don’t escape spaces) to the libamazonredshiftodbc.dylib
file, i.e.
Before we try connecting from Excel, we need to test the connection via ODBC Manager (see prerequisites). Open search bar and start typing ODBC.
You now can open Excel and click on Data
tab and select Get Data
.
Then under User DSN
you should see the DSN we’ve just set up
Select it, provide credentials, and you should be able to connect to Redshift.
Now you should be able to run SQL queries and extract data to an Excel workbook. Just write the query and hit Return Data.
Martyn Janes is a seasoned developer with more than 25 years of experience. He holds a Bachelor’s degree in Computing and a Masters degree in Interactive Computing System Design (Human Computer…
Videos are everywhere. You can’t escape it. Just the other day, I was at Jersey Mike’s with my daughter, ordering a sub like a pro, when I saw my daughter’s rapt attention pointed at a wall T.V…
This question is the first thing many people think when they hear about all of the exciting possibilities in the IoT space. The truth is any business can now find some way to implement connected…