Postgres repository

Aperture Data Studio has always contained a SQLite database, which is a repository for all the objects (Workflows, Users, Spaces, etc.) that are created. The advantage of this type of database is that it is lightweight and does not require maintenance.

For customers running business-critical processes requiring quick failover to a new instance, it is now possible to migrate the repository database to Postgres. This makes the database easier to replicate, which adds resilience to the deployment. Though additional resources and maintenance are required to manage the distributed database infrastructure, this remains a strong option for those who can benefit from its capabilities.

Instructions

  1. Install the Postgres database and create a username/password for Aperture Data Studio to use.

Switch from SQLite to Postgres

  1. Stop the server (we recommend to rename the log file to "_1" so that a new clean one is created).

  2. Convert your SQLite repository to Postgres by locating and updating your Repositories.json file. This file is located in your installation directory, which by default is C:\Program Files\Experian\Aperture Data Studio 3.N.N. Examples of this file are available below.

  1. Start the server and check the log file to ensure the conversion process was successful, and that the Postgres database was created.

Switch from Postgres back to SQLite

If you need to go back to SQLite for any reason:

  1. Stop the server.

  2. Update the Repositories.json file back to its original state containing only SQLite entries (or at least the SQLite entries present in the file before transition to Postgres).

  3. Start the server (it can take 30 to 40 minutes).

Repositories.json

File will look something like this before any Postgres entries are added. It might only contain SQLITE repository.db and not the events.db depending on settings. Also it might have an id different from "1":

[ 
    { 
    "id" :"1", 
    "name" :"Default", 
    "datastoreType" :"SQLITE", 
    "directory" :"C:\\ApertureDataStudio\\data\\repository", 
    "filename" :"repository.db", 
    "username" :"", 
    "password" :"", 
    "createDatabase" : true, 
    "backupOptions" : {
        "enabled" : false, 
        "intervalInMinutes" : 60, 
        "backupHistoryIntervalInMinutes" : 86400, 
        "maxHistoricBackups" : 7, 
        "backupOnStartup" : true
        }
    },
    {
    "id" :"c4167345-84d7-46a7-8824-7d8ca8f67697", 
    "name" :"Events db", 
    "datastoreType" :"SQLITE", 
    "directory" :"C:\\ApertureDataStudio\\data\\repository", 
    "filename" :"events.db",
    "username" :"", 
    "password" :"", 
    "createDatabase" : true, 
    "patchRegistryName" :"eventStorePatchRegistry.json", 
    "databaseRole" :"events", 
    "backupOptions" : {
        "enabled" : false, 
        "intervalInMinutes" : 60, 
        "backupHistoryIntervalInMinutes" : 86400, 
        "maxHistoricBackups" : 7, 
        "backupOnStartup" : true 
        }
    }
]

Add a new entry above SQLITE with the type POSTGRES, host and port, name (lowercase all one word), your PostgresDB username and password, create database true and the id of the SQLite repo being converted:

[
    { 
    "id" :"2pg",
    "name":"new_default",
    "datastoreType":"POSTGRES",
    "host":"localhost",
    "port": 5432,
    "databaseName":"apertureds", 
    "username":"postgres",
    "password":"pw in plain text",
    "createDatabase": true,
    "convertFrom":{
        "id":"1" 
        },

    "backupOptions": {
        "enabled": false,
        "intervalInMinutes": 60,
        "backupHistoryIntervalInMinutes": 86400,
        "maxHistoricBackups": 7,
        "backupOnStartup": true
        } 

    }, 
    {
    "id" :"2wp",
    "name":"workerprocess",
    "datastoreType":"POSTGRES",
    "host":"localhost",
    "port": 5432,
    "databaseName":"workerprocess",
    "username":"postgres",
    "password":"pw in plain text",
    "createDatabase": true,
    "databaseRole":"workerProcess",
    "backupOptions": {
        "enabled": false,
        "intervalInMinutes": 60,
        "backupHistoryIntervalInMinutes": 86400,
        "maxHistoricBackups": 7, 
        "backupOnStartup": true
        }
    }, 
    {
    "id" :"1",
    "name" :"Default",
    "datastoreType" :"SQLITE",
    "directory" :"C:\\ApertureDataStudio\\data\\repository",
    "filename" :"repository.db", 
    "username" :"",
    "password" :"",
    "createDatabase" : true,
    "backupOptions" : {
        "enabled" : false,
        "intervalInMinutes" : 60, 
        "backupHistoryIntervalInMinutes" : 86400,
        "maxHistoricBackups" : 7,
        "backupOnStartup" : true
        }
    },
    { 
    "id" :"c4167345-84d7-46a7-8824-7d8ca8f67697",
    "name" :"Events db",
    "datastoreType" :"SQLITE", 
    "directory" :"C:\\ApertureDataStudio\\data\\repository", 
    "filename" :"events.db",
    "username" :"", 
    "password" :"", 
    "createDatabase" : true, 
    "patchRegistryName" :"eventStorePatchRegistry.json", 
    "databaseRole" :"events", 
    "backupOptions" : {
        "enabled" : false, 
        "intervalInMinutes" : 60, 
        "backupHistoryIntervalInMinutes" : 86400,
        "maxHistoricBackups" : 7, 
        "backupOnStartup" : true 
        }
    }
] 

Note that the second database entry "workerprocess" is only required if the installation is using the Catalog and Governance functionality to store automatically Profiled data.

On restart the log file will contain hundreds of database patches and if successful will automatically add a timestamp to the Repositories.json file and encrypt the password. To change the password in the future, populate the password field and restart the server:

[
    {
    "username":"postgres",
    "password" :"",
    "encryptedPassword" :"8d3a1215049891c8c4e7cdf4e1da510b", 
    "createDatabase": true, 
    "convertFrom" : {
        "id" :"1", 
        "converted" :"2025-04-17 14:08:12"
        },
  }
]