What is data integration?
Tags: dataintegration, datapipelines, datascience, dataengineering
Published: 2022-11-09 18:27:19

## TLDR
Data integration is synchronizing information between 1 system (e.g. [Salesforce](https://www.salesforce.com/)) and another (e.g. [Snowflake](https://www.snowflake.com/))

_<center>![Image description](https://media.graphassets.com/CwsNOp2lSnSyXlXywF72)Source: Giphy_</center>

## Outline
* What is it?
* Why do you need it?
* How do you implement it?
* Who is it for?
* Future and next steps

## What is it?
Data integration is the process of loading data from an external source and then exporting it to an internal destination. This process can also be reversed (e.g. reverse ETL).

### Scenario
You regularly collect gold from scattered kingdoms that have pledged loyalty to your throne. You collect their gold payments through [Stripe](https://stripe.com/).

_<center>![Image description](https://media.graphassets.com/1Yj15gXkSt6wjrtt8tsW)Source: Giphy_</center>

Your treasury (aka finance team) wants to better understand which demographics of kingdoms pay well and on time.

They need the gold payment data from [Stripe](https://stripe.com/) in your [Snowflake](https://www.snowflake.com/) data warehouse so that they can combine it with the kingdom census data. Once combined, they can analyze the data and report it to the high council.

## Why do you need it?
Use cases for integrating external data with internal systems include (but aren’t limited to):
* Combine data from multiple sources to build comprehensive data models for business use cases
* Analyze data from external SaaS tools
* Combine data for personalization
* Forecasting

Example use cases for loading data from your internal systems (e.g. [PostgreSQL](https://www.postgresql.org/)) and then exporting it to an external system (e.g. [HubSpot](https://www.hubspot.com/)) include (but aren’t limited to):
* Getting internal application data into marketing tools (e.g. [Mailchimp](https://mailchimp.com/), [Google Ads](https://ads.google.com/), etc.) for outreach campaigns, ads, etc.
* Syncing user data with CRMs (e.g. [Salesforce](https://www.salesforce.com/))
* Exporting internal data to task management (e.g. [Airtable](https://www.airtable.com/)) software for ops

### Scenario
You’re having a big tournament to celebrate your next heir to the throne. You put out lots of ad posters all over the land. Many knights sign up to compete in your tournament.

_<center>![Image description](https://media.graphassets.com/UKxSjQR0y4WvORLcr8wR)Source: Giphy_</center>

You build a data integration between all the ad service providers (e.g. [Google Ads](https://ads.google.com/), [Facebook Ads](https://www.facebook.com/business/ads), etc.), ingesting data from those APIs and storing it in your [BigQuery](https://cloud.google.com/bigquery) data warehouse.

Your team uses the ad campaign performance data, knight sign ups, tournament results , and spending from spectators to calculate the ROI of ad campaigns. These models will help your team better promote the next tournament more efficiently.

## How do you implement it?
There are 3 ways you can accomplish data integration:
1. Software-as-a-service (SAAS)
  * [Stitch](https://www.stitchdata.com/)
  * [Fivetran](https://www.fivetran.com/)
  * [Hightouch](https://hightouch.com/) (reverse ETL)
  * [Census](https://www.getcensus.com/) (reverse ETL)
2. Open-source software
  * [Mage](https://www.mage.ai/)
  * [Airbyte](https://airbyte.com/)
3. Write the code from scratch or use open-source libraries
  * [Singer](https://www.singer.io/)
  * [Meltano](https://meltano.com/)
  * [Mage](https://www.mage.ai/)
  * Write custom code

_<center>![Image description](https://media.graphassets.com/oog0MK83SpOhm6kII4cl)Source: Giphy_</center>

Some benefits of using SAAS or open-source software is that you get some out-of-the-box features such as (not a comprehensive list):
* When a 3rd party API gets updated, maintainers will help update it
* When there is a duplicate record, you can automatically ignore it or update an existing record
* Automatically track progress and status of synchronizations
* Retry failed synchronizations
* And more…

## Who is it for?
Typically, data engineering owns data integrations. Data engineers can choose how it’s implemented (e.g. buy SAAS or implement open-source software).

Marketing, sales, operations, etc. can help influence which 3rd party sources need data integration or which 3rd party APIs need data synced to it from internal data warehouses.

Depending on which sources are required by specific business use cases, different solutions are required.

_<center>![Image description](https://media.graphassets.com/YwLJKwCLRcyEwbxL7DmA)Source: Giphy_</center>


Companies use SAAS or a self-hosted open-source software to integrate data from common sources. When an uncommon source doesn’t exist out-of-the-box from a SAAS provider, teams typically write the code themselves to handle the synchronization.

In addition, when a team needs to export data from their internal systems to 3rd party APIs (e.g. Salesforce) and has very customized needs, they also typically write custom code to handle their specific use case.

## Future and next steps
Once data is integrated into a common destination, you can begin to combine it with data from other sources, analyze it, then predict on it.

In order to accomplish that, you’ll first need to clean the data, wrangle it, and transform the data all through a data pipeline. Managing this process in a testable, repeatable, and observable way is critical.

_<center>![Image description](https://media.graphassets.com/h4wjGLCoQ1jmp7xmh0uk)Source: Giphy_</center>


In this data integration series, upcoming content will include:
* [Singer Spec](https://github.com/singer-io/getting-started/blob/master/docs/SPEC.md#singer-specification): the data engineering community standard for writing data integrations
* How to write your own data integration
* How to build an end-to-end data pipeline to sync data