Connecting AWS Redshift to SSAS Cubes

Though it is a rare combination but there are cases where you would like to connect an MPP database like Redshift to an OLAP solution for analytics solutions. But, there might be scenarios where you would want a cube to power your reports without the BI server hitting your Redshift cluster. In this post I will show you how to connect to a Redshift instance from a SQL Server Analysis Services 2014.

Environment Setup

In my setup, the Redshift instance is in a VPC while the SSAS server is hosted on an EC2 machine in the same VPC. Access to the Redshift instance and SSAS host machine are controlled by two different security groups. Security group attached to the Redshift cluster has an ingress rule setup for the security group attached to the EC2 machine. I have tried to keep the environment as close to real life setups as possible. In most cases, your environment will be similar to this setup.

Steps to Connect Redshift to SSAS 2014

Step 1:
Download the PGOLEDB driver for your windows machine. You can get the setup file from the website:

Step 2: 
Install the driver by following the installation wizard.

Step 3: Configure your Data Source in SSAS
Note: If you have SSL enabled on your cluster, come back to this step after you have installed the certificate (steps given towards the end of the post).

Create a new project in Business Intelligence Dev Studio (or SQL Server Data Tools if you are using SSAS 2014). In the Object Explorer, create a new Data Source by following these steps:
·     
      Select the Redshift Native OLE DB Provider.
·     
   Fill in the details for the server name, user name and password and the database you want to connect to.


·  Click on the Data Links button to get into the advanced properties of the connection.

·   In the Connection tab, enter the port on which your Redshift cluster is allowing TCP connections



   Move to the Advanced tab and make sure that all the properties are what you want (callout for the SSL mode, depending on your cluster settings). If you have SSL enabled on your cluster, follow the steps in the next section to install the certificate before doing this.


Once done, test the connection. You should see the "Test Successful" popup message.

SSL Connections: Installing the SSL certificate

If your cluster only allows connections over SSL, you will need to install the SSL certificate to fix the issue "Partial Certificate Chain". Download the certificate from this location,


Once downloaded, rename the file as a .cert file and install it.

Once the setup is done and you are able to connect SSAS to Redshift, you should be able to see your Redshift data source in the SSAS connections. Now, you can use this data source to explore tables, build joins and ultimately build your cube. 

That's all. This is a very straightforward setup but not very well documented in the docs. This was my attempt to fill that gap. Do share your feedback in the comments.


Comments

  1. Really thanks. Would please help me to understand how end-user will access cube like excel and outside aws

    ReplyDelete
    Replies
    1. It should be the same as for any other SSAS based cube. Only extra thing you need to do here is to open up your RDS/ EC2 machine's CIDR/ IP rules to your IP. You will have to add these security ingress/ outgress rules to a security group and attach it to the EC2 machine/ RDS where your SSAS is hosted.

      Delete
  2. Amazon Web Services is proud to announce the launch of its latest solution, theAws Data Lakewhich is designed for enterprises looking to create a central repository for all of their big data needs. The Aws Data Lake is useful for enterprises looking to build out cloud-based data storage. It's especially well-suited for companies that want to build a data lake on top of cloud computing, as opposed to in-house data centers.

    ReplyDelete

Post a Comment

Popular posts from this blog

Uber Data Model

Data Engineer Interview Questions: SQL

Cracking Data Engineering Interviews

Hive Challenges: Bucketing, Bloom Filters and More

UBER Data Architecture