Skip to main content
Before delivering audience data to a connector, you need to structure your data in datasets. This guide covers three common strategies for organizing your data, with recommendations for when to use each approach.

Prerequisites

Before you begin:
  • You have data with deliverable identifiers (hashed email, hashed phone, or mobile ad IDs)
  • Your identifiers are properly formatted and hashed (see Hashing PII for Upload)
  • You understand which identifiers your destination requires (see Data Activation Overview)

Strategy 1: One dataset per audience

Create a separate dataset for each audience you want to deliver. The dataset name and description correspond directly to the audience.

Dataset structure

FieldDescription
sha256_hashed_emailThe hashed identifier for each audience member
Example data:
sha256_hashed_email
06a240d11cc201676da976f7b49341181fd180da37cbe40a77432c0a366c80c3
a1b2c3d4e5f6789012345678901234567890123456789012345678901234abcd
b2c3d4e5f6789012345678901234567890123456789012345678901234bcde

When to use this strategy

If your audience creation happens in external systems (CRM, CDP, marketing automation), then export each audience as a separate file for upload.
If you have automated pipelines that create datasets via the SDK, creating a new dataset per audience is straightforward.
If audiences don’t change often, managing them as separate datasets keeps things simple.

Advantages

  • Simplicity: Each dataset maps directly to one audience
  • Clear ownership: Easy to track which dataset powers which audience
  • Selective updates: Update only the audiences that have changed

Considerations

  • Requires creating a new dataset for each new audience
  • Can become difficult to manage with hundreds of audiences
  • Duplicated records across datasets if users belong to multiple audiences

Strategy 2: Master dataset with audience identifiers

Maintain a single dataset containing all audience members, with columns that identify which audience each record belongs to.

Dataset structure

FieldDescription
sha256_hashed_emailThe hashed identifier
audience_idUnique identifier for the audience
audience_nameHuman-readable audience name
Example data:
sha256_hashed_email,audience_id,audience_name
06a240d11cc201676da976f7b49341181fd180da37cbe40a77432c0a366c80c3,1001,high_value_customers
a1b2c3d4e5f6789012345678901234567890123456789012345678901234abcd,1001,high_value_customers
b2c3d4e5f6789012345678901234567890123456789012345678901234bcde,1002,recent_purchasers
c3d4e5f6789012345678901234567890123456789012345678901234cdef,1002,recent_purchasers

Delivering specific audiences

Use NQL to filter for a specific audience when delivering:
SELECT
    sha256_hashed_email
FROM
    company_123.master_audiences
WHERE
    audience_id = '1001'

When to use this strategy

Append new rows to a single dataset instead of managing uploads across many datasets.
Adding a new audience is as simple as appending rows with a new audience_id.

Advantages

  • Centralized management: One dataset to maintain
  • Easy audience additions: New audiences are just new rows
  • Efficient updates: Append new data without managing multiple datasets

Considerations

  • Requires NQL filtering to extract specific audiences
  • Larger dataset size may affect query performance
  • Need to maintain unique audience IDs

Strategy 3: Raw data with dynamic audience creation

Upload a master dataset with all available customer attributes, then use NQL to define audiences dynamically based on any attribute combination.

Dataset structure

FieldDescription
sha256_hashed_emailThe hashed identifier
ageCustomer age
genderCustomer gender
estimated_household_incomeIncome range or value
last_purchase_dateDate of most recent purchase
lifetime_valueTotal customer value
Example data:
sha256_hashed_email,age,gender,estimated_household_income,last_purchase_date,lifetime_value
06a240d11cc201676da976f7b49341181fd180da37cbe40a77432c0a366c80c3,34,male,85000,2024-01-15,1250.00
a1b2c3d4e5f6789012345678901234567890123456789012345678901234abcd,28,female,52000,2024-02-20,890.00
b2c3d4e5f6789012345678901234567890123456789012345678901234bcde,45,female,120000,2024-01-05,3200.00

Creating audiences with NQL

Define audiences on-the-fly using any attribute combination: High-income females:
SELECT
    sha256_hashed_email
FROM
    company_123.customer_data
WHERE
    gender = 'female'
    AND estimated_household_income >= 75000
Recent high-value customers:
SELECT
    sha256_hashed_email
FROM
    company_123.customer_data
WHERE
    last_purchase_date >= '2024-01-01'
    AND lifetime_value >= 1000
Age-based segments:
SELECT
    sha256_hashed_email
FROM
    company_123.customer_data
WHERE
    age BETWEEN 25 AND 44

When to use this strategy

Create any audience segment without re-uploading data or pre-defining audiences.
Send data to Narrative with minimal transformation and let the platform handle segmentation.
Quickly iterate on audience criteria without modifying source data.

Advantages

  • Maximum flexibility: Define any audience criteria without changing data
  • Minimal preprocessing: Upload raw data, segment later
  • Rapid iteration: Test new audience definitions instantly

Considerations

  • Requires familiarity with NQL for audience creation
  • Complex queries may take longer to execute on large datasets
  • Attribute data must be normalized consistently

Choosing a strategy

FactorStrategy 1 (Per Audience)Strategy 2 (Master + IDs)Strategy 3 (Raw Data)
Number of audiencesFew (1-20)Many (20-100+)Variable/unknown
Audience definitionsFixedFixedDynamic
Data preprocessingDone externallyPartialMinimal
NQL requiredNoBasic filteringAdvanced queries
FlexibilityLowMediumHigh
You can combine strategies. For example, use Strategy 3 for your core customer data while maintaining Strategy 1 datasets for specialized audiences from external sources.

Next steps

After structuring your data:
  1. Normalize your data: Map your fields to Rosetta Stone attributes so connectors recognize your identifiers
  2. Configure your connector: Install and configure the connector for your destination platform
  3. Deliver your audiences: Use the connector to push your data to the destination