---
title: Data warehouse Connection Demo
slug: delta-fac-poc/data-warehouse-connection-demo
docTags: 
createdAt: 2024-08-09T14:13:45.126Z
---

<font color="#480bee">Luma Air is a customer-centric airline delivering seamless global travel, premium comfort, innovative technology, and reliable service at competitive prices.</font>

### Use Case

<font color="#480bee">Luma Air aims to enhance the pre-travel experience by delivering personalized, proactive communications to customers based on their upcoming trip needs. This includes targeting travelers who\:</font>

- <font color="#480bee">Have an upcoming international trip and hold a passport that is expired or nearing expiration </font>
- <font color="#480bee">Have indicated dietary restrictions for in-flight meals </font>
- <font color="#480bee">Require wheelchair assistance or mobility support at the airport </font>

<font color="#480bee">By anticipating these needs in advance, Luma Air can ensure a smoother, more comfortable, and stress-free travel experience.</font>

### \[Hands off keyboard!]

This demo will guide you through the process of using Experience Platform Federated Audience Composition to connect to Amazon RedShift and query an audience.

### Prerequisites:

- Adobe Experience Platform account with appropriate permissions.
- Data warehouse account with the necessary database and credentials.

To setup a connection with your database, follow these steps:

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/_7_rwN2uu1FNJlevIOxik-20260501-180151.png)

1. Browse to **FEDERATED DATA** section on the left rail.
2. In the **Federated Databases** link, click on **Add federated database** button.
3. Add a name and select **Amazon Redshift**
4. Fill in the details, click on **Test connection** button, and on **Deploy functions** button.

For this lab, we will connect to a **Amazon RedShift** account. Federated Audience Composition has a growing list of cloud warehouse connections. See link below for an updated list of integrations

- [https://experienceleague.adobe.com/en/docs/federated-audience-composition/using/start/access-prerequisites](https://experienceleague.adobe.com/en/docs/federated-audience-composition/using/start/access-prerequisites)

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/_YVeRvMspcspK28WTBT7g-20260501-180419.png)

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/vFgU6Xw4X3JeRDobFhIuy-20260501-180526.png)

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/qNYEe0E2HdhK2lv5Kbmx0-20260501-180815.png)

# Create a schema

To create schemas in Federated Audience Composition, follow the steps below:

1. In th&#x65;**&#x20;FEDERATED DATA** section, click **Models**.
2. Browse the Schema tab and click on the **Create schema** button.
3. Select your source database in the list, and click on the **Add tables** tab.

Select the following tables

- **CRM**
- **Travel & Hospitality Consent Preference**
- **Traveler Preferences**
- **Flights**

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/5mJIw_Thq36jBtnydi6ia-20260501-181055.png)

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/BlGJlAAvC9F6xcq0ie_O1-20260501-181212.png)

After selecting your tables, you can review the columns of each table then find and select your primary key. For this exercise, we will select **CRMID** as primary key in all tables

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/BWUPOwqmi1Ub47LgeN5xl-20260501-181403.png)

## Preview data in a schema

To preview the data in the table represented by your schema, browse to the **Data model** tab as shown below.

Click on the **Calculate** link to preview the total number of records.



![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/M4JLXlzNpzMBtUgbeKI1g-20260501-181711.png)

# Create a data model

Data models allow you to create a link between tables. The link can be created between tables in the same database such as tables in Amazon Redshift. You can also create a link between tables in different databases such as a link between a table in Amazon Redshift and a table in Snowflake.

To create a data model in Federated Audience Composition, follow the steps below:

1. In FEDERATED DATA section, click **Models** then click **Data Model**. Click the **Create data model** button.
2. Provide a name for your data model, Example is **Travel & Hospitality** **Model**
3. Click on Add schemas and select **CRM, Travel & Hospitality Consent Preference, Traveler Preferences,** and **Flights** schemas.
4. This will now allow you to create a link between these tables, click on **Create links**.&#x20;
5. When creating a link, choose the applicable cardinality
   1. **1-N**: one occurrence of the source table can have several corresponding occurrences of the target table, but one occurrence of the target table can have at most one corresponding occurrence of the source table.
   2. **N-1**: one occurrence of the target table can have several corresponding occurrences of the source table, but one occurrence of the source table can have at most one corresponding occurrence of the target table.
   3. **1-1**: one occurrence of the source table can have at most one corresponding occurrence of the target table.

Below is a preview of the link created for the lab exercises. The link enables a join between the CRM and consent tables, using the primary key of CRMID to perform a join.

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/N8hcidXRDs1iddXb6qdtG-20260501-182201.png)



