DinMo Documentation
  • 📙Core Concepts
  • Guides
    • ⚡Get started with DinMo
      • Initial Configuration of DinMo
        • Connect a Source
        • Create your Models
        • Create a Destination
      • Create and Activate Segments on DinMo
        • Create your first Segment
        • Activate your first Segment
    • 🌐Workspaces & Organizations
    • 💭Need Help?
  • Integrations
    • Data Sources
      • AWS Redshift
      • Databricks
      • Google BigQuery
      • PostgreSQL
      • Snowflake
    • Destination Platforms
      • Actito
        • Synchronize users attributes
        • Export contact lists
      • All My SMS
      • Batch
        • Synchronize contacts (MEP)
        • Synchronize profiles (CEP)
        • Send events (CEP)
      • Braze
        • Synchronize users attributes
        • Send track events
        • Synchronize subscription statuses
        • Export user lists
      • Brevo
        • Synchronize contacts
        • Export contact lists
      • Criteo
        • Export contact lists
      • Dialog Insight
        • Synchronise Contacts
      • Emarsys
        • Export contact lists
        • Synchronize contacts data
        • Synchronize custom table's data (RDS)
      • Firestore
        • Create and update Collection Documents
        • Export Audiences
      • Google Ads
        • Export audiences
        • Enhanced Conversions for Web
        • Upload click or offline conversions
          • Prerequisites and walkthrough
        • Adjust conversion events
        • Retract conversion events
      • Google Display & Video 360
        • Export audiences
      • Google Search Ads 360
      • Hubspot
        • Synchronize objects
      • Intercom
        • Export segments
        • Synchronize contacts
        • Synchronize companies
      • Iterable
        • Synchronize user attributes
        • Export contact lists
      • June Email Marketing
        • Export Contact Lists
      • Klaviyo
        • Export contact lists
        • Synchronise contacts
        • Create subscription list
      • LinkedIn Ads
        • Export user audiences
        • Export company audiences
      • Mailchimp
        • Export segments
      • Meta Ads
        • Export audiences
        • Send conversion events
      • Microsoft Ads (Bing)
        • Export audiences
      • Pinterest Ads
        • Export audiences
        • Send conversions
      • Reddit Ads
        • Export Audiences
      • Salesforce Marketing Cloud
        • Synchronize data extensions
      • SendGrid
        • Synchronize contacts
        • Export contact lists
      • Selligent
      • Snapchat Ads
        • Export Audiences
      • Splio
        • Synchronize contacts
      • TikTok Ads
        • Export Audiences
        • Send Offline Conversions
        • Send Web Conversions
      • X (Twitter)
        • Export audiences
      • Zendesk
        • Synchronize users
        • Synchronize custom objects' data
  • Models
    • Overview
    • Primary Keys
      • Detect duplicate primary keys
    • Calculated Fields
  • Identity resolution
    • Overview
  • Segments
    • Visual Builder
    • Breakdowns
    • Overlap Analysis
  • Activations
    • Overview
    • Sync Scheduling
    • Troubleshooting Syncs
      • Automatic pause or resume Activations
      • Sync warnings
  • AI PREDICTIONS
    • Overview
    • LTV and Churn
    • Product Recommendations
  • WORKSPACE MANAGEMENT
    • Set Up
    • Managing Users & Roles
    • Audit Logs
    • Enterprise Single Sign-On (SSO)
  • Security & Privacy
    • Overview
    • Networking
    • Privacy
    • Data Processing
Powered by GitBook
On this page
  • At model creation
  • Daily checks
  • Manual check
  1. Models
  2. Primary Keys

Detect duplicate primary keys

PreviousPrimary KeysNextCalculated Fields

Last updated 3 months ago

As the uniqueness of the primary key is really important to guarantee optimal DinMo operation, we will help you check the level of duplication:

  • When creating the model

  • Once a day, after model creation

  • On demand by consulting your model

To calculate the percentage of unique primary keys, DinMo uses the following formula:

percentage = (count(distinct primary key) / count(primary key)) * 100

This formula divides the number of distinct primary keys by the total number of primary keys, then multiplies by 100 to get the percentage.

At model creation

When you create a model and click "Save," a pop-up will appear, allowing you to verify the percentage of duplicate primary keys within the model.

There are three possible scenarios: the primary key is unique, the duplicate rate is low or the duplicate rate is too high.

No duplicate primary keys

DinMo checks that the primary key you've selected is unique, i.e. that the percentage of unique primary keys is 100%.

In that case, you are directly invited to save the model.

The duplicate rate is low

This is the case if the rate of non-unique primary keys is less than 5%. In this case, DinMo alerts you that your model may have a problem.

If you leave your duplicate rate above 0%, the situation is likely to worsen over time, affecting DinMo's operations. Don't worry, you'll be alerted anyway if this becomes the case, thanks to our daily checks.

If you decide to leave your duplicate rate above 0%, we'll also alert you in your model overview.

The duplicate rate is too high

If your duplicate rate is higher than 5%, you won't be able to register your model in DinMo.

You then have several options for correcting your problem:

  • Go back to the configuration and choose an other primary key (e.g. customer_id instead of last_name)

  • Modify your table structure / clean your data directly from your source, to ensure unique primary

You can then re-click on “Check duplicate primary key”. If the duplicate rate falls below 5%, the warning will disappear and you will be able to save your model.

Daily checks

To ensure that the duplicate rate remains low over time, DinMo performs automatic checks every day.

If the primary key remains unique (0% duplication), there will be no impact on your model — and therefore on the associated objects.

On the contrary, if DinMo detects that the primary key is not unique, you will be alerted and a warning message will appear on your model:

In that case, you'll need to update your table directly in your data warehouse. Cleaning your data will ensure that the duplicate rate remains as close to 0% as possible.

When the changes have been made, you can click on “Check duplicate primary key” again. If everything has been done correctly, your alert message will disappear.

Manual check

If you've made changes to your data warehouse and want to make sure that this doesn't impact the duplicate rate in your model, you can check this directly in DinMo.

To do so, directly go to your model and click on "..." at the top right of your page:

A new pop up will open and update the percent of duplicate primary keys. DinMo will then display the warning and the associated error if needed.

You can save your model this way, but we strongly recommend that you correct your source data to restore a duplicate rate equal to 0%.

⚠️
Primary key is unique - You can save the model
Primary key is not unique but duplicate rate is still low
Alert on the model - Duplate primary keys detected
Duplicate rate is too high - You can't save the model
No duplicate then a lot: warning message
Manually check duplicates by clicking on "Check duplicates"