---
schema_version: "1"
id: 83e423f03622efd03cae532ad2331cd0207db91498f0c0c499ff09ef846b58a6
title: Create a Data Stream with DirectConnect
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/mktg/264-0-0/dato_data_streams_direct_create.md
canonical_url: https://help.salesforce.com/s/articleView?id=mktg.dato_data_streams_direct_create.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 9b728d31852b289ec4acd9b7eab9ed79a945526ee387caafe45da8cf4aca5eeb
description: Use DirectConnect to create a data stream and retrieve data directly from an external database. You can either configure a database, or connect to a database manually with a user and password. After connecting to the database and testing the connection, you can create a query to determine how data from the database is represented in Marketing Cloud Intelligence. Make sure the scope of the query is as close to the consumption requirements as possible for faster processing and performance.
products:
  - Marketing
  - Marketing Cloud Intelligence
release: "264"
---
# Create a Data Stream with DirectConnect

Use DirectConnect to create a data stream and retrieve data directly from an external database. You can either configure a database, or connect to a database manually with a user and password. After connecting to the database and testing the connection, you can create a query to determine how data from the database is represented in Marketing Cloud Intelligence. Make sure the scope of the query is as close to the consumption requirements as possible for faster processing and performance.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d52279e38">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d52279e38 ">To create a DirectConnect data stream:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d52279e38 ">Admin</td>

          </tr>
        </tbody>
      </table>

1. On the Connect & Mix tab, select **Data Streams** and then **Data Streams List**.
2. Click **Create New**.
3. Click **DirectConnect**.
4. Configure your database connection as required, or manually enter the connection string using a username and password.
5. To verify the connection works, click **Test Connection**.
6. To create a query for the database, click **Next**. This query determines how your DirectConnect data is represented in Marketing Cloud Intelligence. For example, enter \* from user\_visits
7. After the query is created, click **Validate**.
8. To move onto the data verification mode, click **Review**.
9. In the **Configure** tab, enter a name for the table. Make sure the table name is short, yet descriptive.
10. In the **Data Type** section, make sure that the dimensions and measurements were identified correctly.
11. To validate a dimension or measurement, hover over a category or an individual column name. The corresponding field is highlighted in the table.
12. To redefine a column as a dimension or measurement, click the icon to the right of the field name. In the **Connect** tab, edit the connection string.
13. To save each query result for a defined cache duration, set the **Caching Duration** time and units. Use this option if you want to improve performance. For more information, see Real-time Connection and Performance in DirectConnect Data Streams
14. Click **Create**.

#### See Also

- [Connection and Performance Optimization in DirectConnect Data Streams](https://help.salesforce.com/s/articleView?id=mktg.dato_data_streams_direct_connection.htm&release=264.0.0&type=5 "Setting up a DirectConnect data stream establishes a real-time connection to your database. Each time an entity that uses dimensions or measurements sourced from DirectConnect is loaded, your database is queried in real time. A real-time connection can potentially result in many calls being made to your database concurrently, leading to slower performance and exceeding rate limits.")