---
schema_version: "1"
id: 2ae45bb6dc8119fa1bd8a423792b4a907d4fe464fdbda03507e2ecffb31b0b0b
title: Create a Streaming Insight Using SQL
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/data/264-0-0/c360_a_create_a_streaming_insight_using_sql.md
canonical_url: https://help.salesforce.com/s/articleView?id=data.c360_a_create_a_streaming_insight_using_sql.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 8d99ad866c32eb2190a64d5df6ea7d45e89e313951ccfa60ddc4979fca6d1122
description: Write SQL expressions to compute streaming metrics across dimensions from your near real-time data sources. A streaming insight analyzes data at specific points in time. Streaming insights help build time series aggregations in near real time to orchestrate and optimize your data within Data 360.
products:
  - Data 360
release: "264"
---
# Create a Streaming Insight Using SQL

Write SQL expressions to compute streaming metrics across dimensions from your near real-time data sources. A streaming insight analyzes data at specific points in time. Streaming insights help build time series aggregations in near real time to orchestrate and optimize your data within Data 360.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>All Editions</strong> supported by Data 360. See <a href="https://help.salesforce.com/s/articleView?id=data.c360_a_dc_editions.htm&amp;language=en_US" target="_blank">Data 360 edition availability</a>.</td></tr></tbody></table>

<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:left;vertical-align:top;" id="d168143e61">User Permission Sets
              Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permission Sets Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d168143e61 ">To create streaming insights:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d168143e61 ">
              <p>Permission set: </p>
              <ul>
                <li>Data Cloud Architect</li>

              </ul>
            </td>

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

Setting up streaming insights requires several prerequisites and steps. To ensure the best results, follow this action flow.

![streaming insights data flow](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-data-data_cloud-264-0-0-production-enus/f3569962-3c9b-4f83-9d0c-b6a574e785da/data_cloud/images/streaming_insights_and_data_actions_flow.png)

- Data sources—Map sources to different objects from Web & Mobile SDK, ingestion API, and Marketing Cloud Personalization data streams.
- Identity resolution and data mapping—Ingest your data into Data 360, and create unified individuals with identity resolution.
- Insights—Streaming Insights are similar to calculated insights but have specialized functions to manage streaming data.
- Match rules—Enrich with unified individual data from customers.
- Enrichment—Enhance data actions with profile-related attributes.
- Data actions—Apply data actions on a streaming insight and evaluate if the action is necessary.
- DMO—Streaming insights can only use the engagement DMO as primary DMO. Profile and Other DMO can be used as a right table join.
- Window function—Streaming insights require a window function aggregate. Define the window frame in the `SELECT` statement using `window.start` and `window.end`.

1. In Data Cloud, go to the Calculated Insights tab, and click **New**.
2. From the Data Space dropdown, select a data space.
    
    You can use only the data spaces that you have access to.
3. Click **Streaming Insights**.
4. Click **Use SQL Authoring** and click **Next**.
5. Enter the streaming insight name, and click **Next**.
    
    The Streaming Insight API Name field is auto-filled.
6. Enter a SQL query expression up to 131,021 characters.
7. When your insight includes currency measures, you must use the `TRY_CONVERT_CURRENCY` function.
8. To check whether your SQL expression is valid, click **Check Syntax**.
    
    If it isn’t valid, you can’t continue.
9. Click **Save and Run**.

The streaming insight is displayed on the record home page. The last run status of a streaming insight is always Processing.

#### See Also

- [_Trailhead_: Data 360 Insights](https://trailhead.salesforce.com/content/learn/modules/customer-data-platform-insights?trail_id=enhance-data-in-customer-data-platform)