Salesforce to Redshift: 2 Easy Methods

on Tutorial • November 26th, 2021 • Write for Hevo

Bringing your client accounts, product lists, sales, marketing leads, and more from Salesforce to Redshift is the first step in building a strong analytics infrastructure. Combining this data with valuable information from other sources within the warehouse can empower you to derive deeper meaningful insights.

In this article, we will look at two ways of getting data from Salesforce to Redshift. We will also discuss the pros and cons of these approaches and ways to navigate them.

Table of Contents

Introduction to Salesforce

Salesforce to Redshift-Salesforce Logo
Image Source

Salesforce is one of the world’s most renowned customer relationship management platforms. Salesforce comes with a wide range of features that allow you to manage your key accounts and sales pipelines. While Salesforce does provide analytics within the software, many businesses would want to extract this data, combine it with data from other sources such as marketing, product, and more to get deeper insights on the customer. By bringing the CRM data into a modern data warehouse like BigQuery, this can be achieved.

Key Features of Salesforce

Salesforce is one of the most popular CRM in the current business scenario and it is due to its various features. Some of these key features are:

  • Easy Setup: Unlike most CRMs, which usually take up to a year to completely get installed and deployed, Salesforce can be easily set up from scratch within few weeks only.
  • Ease of Use: Businesses usually have to spend more time putting it to use and comparatively much lesser time in understanding how Salesforce works.
  • Effective: Salesforce is convenient to use and can also be customized by businesses to meet their requirements. Due to this feature, users find the tool very beneficial.
  • Account Planning: Salesforce provides you with enough data about each Lead that your Sales Team can customize their approach for every potential Lead. This will increase their chance of success and the customer will also get a personalized experience.
  • Accessibility: Salesforce is a Cloud-based software, hence it is accessible from any remote location if you have an internet connection. Moreover, Salesforce has an application for mobile phones which makes it super convenient to use.

Introduction to Redshift

Salesforce to Redshift- Redshift Logo
Image Source

Amazon Redshift is essentially a storage system that allows companies to store petabytes of data across easily accessible “Clusters” that you can query in parallel. Every Amazon Redshift Data Warehouse is fully managed which means that the administrative tasks like maintenance backups, configuration, and security are completely automated. 

Amazon Redshift is primarily designed to work with Big Data and is easily scalable due to its modular node design. It also allows users to gain more granular insight into datasets, owing to the ability of Amazon Redshift Clusters to be further divided into slices. Amazon Redshift’s multi-layered architecture allows multiple queries to be processed simultaneously thus cutting down on waiting times. Apart from these, there are a few more benefits of Amazon Redshift that are covered in the following section.

Key Features of Amazon Redshift

  • Enhanced Scalability: Amazon Redshift is known for providing consistently fast performance, even in the face of thousands of concurrent queries. Amazon Redshift Concurrency Scaling supports nearly unlimited concurrent queries and users. By leveraging Redshift’s managed storage, capacity is added to support workloads of up to 8 PB of compressed data. Scaling is just a simple API call, or a few clicks in the console away.    
  • Easy Management: Amazon Redshift automates oft-repeated maintenance tasks so that you can focus on gathering actionable insights from your data. It is fairly simple to set up and operate. A new Data Warehouse can be deployed with just a few clicks in the AWS console. Key administrative tasks like backup and replication are automated. Data in Amazon Redshift is automatically backed up to Amazon S3. Amazon Redshift can replicate your snapshots to Amazon S3 asynchronously in a different region for disaster recovery. The Automatic Table Optimization selects the best distribution keys and sort method to enhance the performance efficacy for the cluster’s workload. Amazon Redshift also gives you the flexibility to work with queries in the console, or Business Intelligence tools, libraries, and SQL client tools. Also, check out the Redshift Sortkeys article.
  • Robust Security: Amazon Redshift is known for providing robust data security features at no extra cost. Amazon Redshift allows you to configure firewall rules to take control of network access to a specific Data Warehouse Cluster. Amazon Redshift also specializes in granular column and row-level security controls that ensure that users can only view data with the right type of access. Apart from these, Amazon Redshift also delivers on its promise of reliability and compliance through tokenization, end-to-end encryption, network isolation, and auditing.  
  • Data Lake and AWS Integrated: Amazon Redshift allows you to work with data in various open formats that can easily integrate with the AWS ecosystem. Amazon Redshift makes it exceptionally easy to query and write data to your Data Lake in open formats such as JSON, ORC, CSV, Avro to name a few. The federated query capability allows you to query live data across multiple Aurora PostgreSQL and Amazon RDS databases to get enhanced visibility into the business operations. This is carried out without the need for any undesired data movement. The AWS Analytics ecosystem allows you to handle end-to-end analytics workflows without any hiccups. You can also bring in data from various applications like Google Analytics, Facebook Ads, Salesforce to an Amazon Redshift Data Warehouse in a streamlined manner.     
  • Flexible Performance: Amazon Redshift distinguishes itself by offering swift, industry-leading performance with a keen focus on flexibility. This is made possible through result caching, materialized views, efficient storage, RA3 instances, and high-performance query processing to name a few. Result Caching is used to deliver sub-second response times for repeat queries. Business Intelligence tools, dashboards, visualizations leveraging repeat queries experience a significant performance boost. At the time of execution, Amazon Redshift looks through the cache to see if there is a cached result for repeat queries. Amazon Redshift also uses sophisticated algorithms to classify and predict the incoming queries based on their run times and resource requirements to manage concurrency and performance dynamically. This helps users prioritize business-critical workloads.

Methods to move data from Salesforce to Redshift

Data can be copied from Salesforce to Redshift in either of two ways:

Method 1: Using Custom ETL Scripts to Move Data from Salesforce to Redshift

You will need to use engineering resources to write the scripts to get data from Salesforce to S3 and then to Redshift for free. You will also need to maintain the infrastructure for this and monitor the scripts on an ongoing basis.

Method 2: Using Hevo to Move Data from Salesforce to Redshift

Hevo can move your data from Salesforce to Redshift in minutes without the need for any coding. This is done using an interactive visual interface. Hevo is also fully managed, so you need to have no concerns about maintenance and monitoring. This will enable you to focus on producing valuable insights from the data.

Get Started with Hevo for free

Let’s look more closely at both of these methods. Also before reading the methods, you can check our article on Salesforce connect.

Methods to Connect Salesforce to Redshift

Here are the methods you can use to connect Salesforce to Redshift in a seamless fashion:

Method 1: Using Custom ETL Scripts to Move Data from Salesforce to Redshift

Let’s have a look at what is entailed in this process:

  • Step 1: First, you need to write scripts for your selected Salesforce APIs. Salesforce was one of the first companies to use cloud computing and develop APIs. Their range of APIs is legendary. As you will be looking to keep your data current, you need to make sure your scripts can fetch updated data. You may even have set up cron jobs
  • Step 2: Working in Redshift, you will need to create tables and columns and map Salesforce’s JSON files to this schema. You will also have to make sure each JSON data type is mapped to a data type supported by Redshift
  • Step 3: Redshift is not designed for line-by-line updates, so using an intermediary such as AWS S3 is recommended. If you choose to use S3, you will need to:
    • Create a bucket for your data.
    • Use Curl or Postman to write an HTTP PUT for your AWS REST API.
    • Once this has been done your data can be sent to S3.
    • Finally, you will need to run a COPY command is needed to get your data into Redshift.
  • Step 4: This intermediate step is another area you need to monitor. If there are any changes in the Salesforce API your S3 bucket will need to be updated.

Limitations of using Custom ETL Scripts to Move Data from Salesforce to Redshift

There are significant downsides to writing thousands of lines of code to copy your data. We all know that custom coding holds the promise of control and flexibility. but we often underestimate the complexity and the cost involved.

The next few paragraphs will give you an understanding of the actual downside of custom coding in this instance:

Your Salesforce APIs will need to be monitored for changes and you will need to stay on top of any updates to Redshift. You will also need a data validation system that ensures your data is replicating correctly. This system should also check if your tables and columns in Redshift are being updated as expected.

These administrative tasks are a heavy load in today’s agile environment where resources are almost always fully occupied and utilized. You will have to use a finite number of engineering resources just to stay on top of all the possible breakdowns. This would leave less scope for new projects to be taken up.

Think about how you would:

  1. Know if Salesforce has changed an API?
  2. Know when Redshift is not available for writing?
  3. Find the resources to rewrite code when needed?
  4. Find the resources to update Redshift schema in response to new data requests?

Opting for Hevo cuts out all these questions. You will have fast and reliable access to analysis-ready data and you can focus your attention on finding meaningful insights.

Method 2: Using Hevo to Move Data from Salesforce to Redshift

Salesforce to Redshift- Hevo Logo
Image Source

Hevo Data, a No-code Data Pipeline, helps you directly transfer data from Salesforce and 100+ other data sources (including 40+ Free Data Sources) to Data Warehouses such as Redshift, Databases, BI tools, or a destination of your choice in a completely hassle-free & automated manner. Hevo is fully managed and completely automates the process of not only loading data from your desired source but also enriching the data and transforming it into an analysis-ready form without having to write a single line of code. Its fault-tolerant architecture ensures that the data is handled in a secure, consistent manner with zero data loss.

Sign up here for a 14-day Free Trial!

You can connect Salesforce to Redshift in the following 2 steps:

  • Step 1: Authenticate and configure your Salesforce data source as shown in the below image. To learn more about this step, visit here.
Salesforce to Redshift-Salesforce Source Config
Image Source
  • Step 2: Load data from Salesforce to Redshift by providing your Redshift databases credentials like Database Port, Username, Password, Name, Schema, and Cluster Identifier along with the Destination Name.
Salesforce to Redshift- Redshift Destination Config
Image Source


By automating all the burdensome ETL tasks, Hevo will ensure that your Salesforce data is securely and reliably moved to Amazon Redshift in real-time.

Advantages of using Hevo

  • Code-free ETL or ELT: You need not write and maintain any ETL scripts or cron jobs.
  • Low set up time: Data is copied in minutes once you have connected Salesforce to Redshift.
  • 100% Data Accuracy: Hevo reliably delivers your data in real-time from Salesforce to Redshift. It’s AI-powered, the fault-tolerant architecture you will always have accurate and current data readily available.
  • Automatic Schema Handling: Hevo does automatic schema detection, evolution, and mapping. The platform will detect any change in incoming Salesforce schema and make necessary changes in Redshift.
  • Granular Activity Log and Monitoring: Your data flow is monitored in real-time, detailed activity logs are kept. You will also get timely alerts on Slack and email with status reports of data replication, detected schema changes, and more. Hevo’s activity log will let you observe user activities, transfer failures – successes, and more.
  • Unmatched support: Hevo offers 24*7 support to all its customers via email 24×7 and on Slack.

There is a huge amount of flexibility you get from building your own custom solution to move data from Salesforce to Redshift for free. However, this comes with a high and ongoing cost in terms of engineering resources.

Conclusion

This blog talks about the two methods you can use to move data from Salesforce to Redshift in a seamless fashion.

Hevo is a fault-tolerant, dependable Data Integration Platform. With Hevo you will work in an environment where you can securely move data from any source to any destination. In addition to Salesforce, you can load data from 100s of other sources using Hevo.

Visit our Website to Explore Hevo

Want to take Hevo for a spin? Sign Up for a 14-day free trial and experience the feature-rich Hevo suite first hand. You can also have a look at the unbeatable pricing that will help you choose the right plan for your business needs.

No-code Data Pipeline for Redshift