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
  1. Integrations
  2. Data Sources

PostgreSQL

Connecting DinMo to PostgreSQL: Step-by-Step Guide

Go to the workspace settings, then to the Source tab, and click "Add New Source".

  • Step 1: Select PostgreSQL from the list of available sources

  • Step 2: Create a DinMo user on your DataWarehouse and the DinMo technical datasets. DinMo needs to read all the tables that you want to use to build models and segments. It also needs to write access to 3 schemas that will be used to store technical (segment queries, segment stats, activation snapshots).

    We recommend you to create a specific user for DinMo and grant it the needed permissions.

    You can do so by running the following SQL snippet.

-- Give the DinMo user the ability to sign in with a password
CREATE USER DINMO_USER WITH PASSWORD '<strong, unique password>';

-- Create the schemas that DinMo will use to store technical data that enables to run your activations

CREATE SCHEMA IF NOT EXISTS DINMO_DELTA_STORAGE;
CREATE SCHEMA IF NOT EXISTS DINMO_SEGMENTS;
CREATE SCHEMA IF NOT EXISTS DINMO_STATS;
CREATE SCHEMA IF NOT EXISTS DINMO_PREDICTIONS;

-- Grant the DinMo user full access to these schemas

GRANT CREATE, USAGE ON SCHEMA DINMO_DELTA_STORAGE TO DINMO_USER;
GRANT CREATE, USAGE ON SCHEMA DINMO_SEGMENTS TO DINMO_USER;
GRANT CREATE, USAGE ON SCHEMA DINMO_STATS TO DINMO_USER;
GRANT CREATE, USAGE ON SCHEMA DINMO_PREDICTIONS TO DINMO_USER;

-- Let the DinMo user read and query the schemas that contain the data that you want to use in the DinMo Platform
-- Replace <your schema> with the name of the schema where you store the tables and views that will be used in the DinMo Platform 
-- Repeat this operation for all the schemas that store relevant data that you want to connect to DinMo 

GRANT USAGE ON SCHEMA "<your schema>" TO DINMO_USER;
GRANT SELECT ON ALL TABLES IN SCHEMA "<your schema>" TO DINMO_USER;
ALTER DEFAULT PRIVILEGES IN SCHEMA "<your schema>" GRANT SELECT ON TABLES TO DINMO_USER;
GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA "<your schema>" TO DINMO_USER;
ALTER DEFAULT PRIVILEGES IN SCHEMA "<your schema>" GRANT EXECUTE ON FUNCTIONS TO DINMO_USER;

Please edit the <value> fields in the script to define your own credentials and parameters.

  • Step 3: Fill in the required information

    • Host: The hostname or IP address of your cluster.

    • Database: The name of the database in your cluster.

    • Port: The port number of your cluster. The default is 5439, but yours may be different.

    • User and password: The credentials you created in the script above.

  • Step 4: Hit "Save & Test". This will launch a test ensuring that the connection is working. If so, congratulations, your source setup is finished!


If you encounter an error or question not listed below and need assistance, don't hesitate to reach out to your account manager or support@dinmo.com. We're here to help!

PreviousGoogle BigQueryNextSnowflake

Last updated 1 month ago