Batch export
Didomi can export batches of user consent data to provide you with a full dump of the users, events, and proofs stored on the platform.

Destinations

Didomi can send exported data to various locations:

Types of data

Didomi can export different types of consents data depending on the product and business requirements:

Logging and monitoring

Didomi offers the ability to retrieve information and monitor the status of your batch exports. Read more on logging.

Format

Data exported at the destination follows the Apache Hive naming conventions for partitioning and exposes 2 partitions:
Partition name
Description
export-id
Unique ID for the configured batch export. This allows you to distinguish files exported between multiple configured exports.
date
The date/hour when the export happened (YYYY-MM-DD format).
Example of a path to the exported data: /data/export-id={batch export ID}/date={YYYY-MM-DD}/

Users & Events

Structure

Didomi exports user-level data in a users/ folder and in files formatted as newline-delimited JSON (one JSON object per line), and compressed as GZIP. We use the file extension .json.gz.
Example: /data/export-id={batch export ID}/date={YYYY-MM-DD}/users/
For every partition, the exported data can be split up into multiple files. Make sure that you read every .json.gz file in the partition folder to get all the records belonging to that export. File names are subject to change over time so make sure that your read files from their extension (.json.gz) and not from a specific filename or format. Additionally, a file named _SUCCESS is created once the export is complete. Do not read files from a partition until the _SUCCESS file is created as you might read partial records otherwise.

Content

The files exported by Didomi contain users and their events for the period covered by the export. Every line of the files contains a self-sufficient JSON record (newline-delimited JSON) that includes both the user and its associated events.
You should first split the files on new lines and then parse every line as an individual JSON record. It is a pretty standard encoding for data processing tools like Hive, Spark, Presto, etc. and should be straightforward to import in your existing tools.
The schema of the objects exported is as follows:
1
{
2
/**
3
* User object following the User schema
4
* https://developers.didomi.io/api/consents/users#user-schema
5
*/
6
"user": {
7
...
8
},
9
10
/**
11
* Array of event objects following the Event schema
12
* https://developers.didomi.io/api/consents/events#event-schema
13
*/
14
"events": [
15
{ ... },
16
{ ... },
17
...
18
]
19
}
Copied!
Example of an exported file:
1
{"user":{"consents":{"purposes":[{"id":"OeWK1234","enabled":true,"preferences":[{"id":"commercial_communication","enabled":true,"channels":[{"id":"email","enabled":true}]}]}],"vendors":{"enabled":[],"disabled":[]}},"metadata":{},"organization_user_id":"[email protected]","organization_user_id_type":null,"version":1,"organization_id":"organization_id","id":"00019ba4-1561-4d55-a8ae-b8b1d203aeaa","created_at":"2019-11-05T16:24:34.450Z","updated_at":null},"events":[{"id":"747f7907-facb-4ddf-811f-e3eaa1df1d21","organization_id":"organization_id","created_at":"2019-11-05T16:24:34.450Z","user":{"organization_user_id":"[email protected]","id":"00019ba4-1561-4d55-a8ae-b8b1d203aeaa"},"source":{},"consents":{"purposes":[{"id":"OeWK1234","enabled":true,"preferences":[{"id":"commercial_communication","enabled":true,"channels":[{"id":"email","enabled":true}]}]}],"vendors":{"enabled":[],"disabled":[]}}}]}
2
{"user":{"consents":{"purposes":[{"id":"OeWK1234","enabled":true,"preferences":[{"id":"commercial_communication","enabled":true,"channels":[{"id":"email","enabled":true}]}]}],"vendors":{"enabled":[],"disabled":[]}},"metadata":{},"organization_user_id":"[email protected]","organization_user_id_type":null,"version":1,"organization_id":"organization_id","id":"00019ba4-1561-4d55-a8ae-b8b1d203aeaa","created_at":"2019-11-05T16:24:34.450Z","updated_at":null},"events":[{"id":"747f7907-facb-4ddf-811f-e3eaa1df1d21","organization_id":"organization_id","created_at":"2019-11-05T16:24:34.450Z","user":{"organization_user_id":"[email protected]","id":"00019ba4-1561-4d55-a8ae-b8b1d203aeaa"},"source":{},"consents":{"purposes":[{"id":"OeWK1234","enabled":true,"preferences":[{"id":"commercial_communication","enabled":true,"channels":[{"id":"email","enabled":true}]}]}],"vendors":{"enabled":[],"disabled":[]}}}]}
3
{"user":{"consents":{"purposes":[{"id":"OeWK1234","enabled":true,"preferences":[{"id":"commercial_communication","enabled":true,"channels":[{"id":"email","enabled":true}]}]}],"vendors":{"enabled":[],"disabled":[]}},"metadata":{},"organization_user_id":"[email protected]","organization_user_id_type":null,"version":1,"organization_id":"organization_id","id":"00019ba4-1561-4d55-a8ae-b8b1d203aeaa","created_at":"2019-11-05T16:24:34.450Z","updated_at":null},"events":[{"id":"747f7907-facb-4ddf-811f-e3eaa1df1d21","organization_id":"organization_id","created_at":"2019-11-05T16:24:34.450Z","user":{"organization_user_id":"[email protected]","id":"00019ba4-1561-4d55-a8ae-b8b1d203aeaa"},"source":{},"consents":{"purposes":[{"id":"OeWK1234","enabled":true,"preferences":[{"id":"commercial_communication","enabled":true,"channels":[{"id":"email","enabled":true}]}]}],"vendors":{"enabled":[],"disabled":[]}}}]}
4
{"user":{"consents":{"purposes":[{"id":"OeWK1234","enabled":true,"preferences":[{"id":"commercial_communication","enabled":true,"channels":[{"id":"email","enabled":true}]}]}],"vendors":{"enabled":[],"disabled":[]}},"metadata":{},"organization_user_id":"[email protected]","organization_user_id_type":null,"version":1,"organization_id":"organization_id","id":"00019ba4-1561-4d55-a8ae-b8b1d203aeaa","created_at":"2019-11-05T16:24:34.450Z","updated_at":null},"events":[{"id":"747f7907-facb-4ddf-811f-e3eaa1df1d21","organization_id":"organization_id","created_at":"2019-11-05T16:24:34.450Z","user":{"organization_user_id":"[email protected]","id":"00019ba4-1561-4d55-a8ae-b8b1d203aeaa"},"source":{},"consents":{"purposes":[{"id":"OeWK1234","enabled":true,"preferences":[{"id":"commercial_communication","enabled":true,"channels":[{"id":"email","enabled":true}]}]}],"vendors":{"enabled":[],"disabled":[]}}}]}
5
{"user":{"consents":{"purposes":[{"id":"OeWK1234","enabled":true,"preferences":[{"id":"commercial_communication","enabled":true,"channels":[{"id":"email","enabled":true}]}]}],"vendors":{"enabled":[],"disabled":[]}},"metadata":{},"organization_user_id":"[email protected]","organization_user_id_type":null,"version":1,"organization_id":"organization_id","id":"00019ba4-1561-4d55-a8ae-b8b1d203aeaa","created_at":"2019-11-05T16:24:34.450Z","updated_at":null},"events":[{"id":"747f7907-facb-4ddf-811f-e3eaa1df1d21","organization_id":"organization_id","created_at":"2019-11-05T16:24:34.450Z","user":{"organization_user_id":"[email protected]","id":"00019ba4-1561-4d55-a8ae-b8b1d203aeaa"},"source":{},"consents":{"purposes":[{"id":"OeWK1234","enabled":true,"preferences":[{"id":"commercial_communication","enabled":true,"channels":[{"id":"email","enabled":true}]}]}],"vendors":{"enabled":[],"disabled":[]}}}]}
6
{"user":{"consents":{"purposes":[{"id":"OeWK1234","enabled":true,"preferences":[{"id":"commercial_communication","enabled":true,"channels":[{"id":"email","enabled":true}]}]}],"vendors":{"enabled":[],"disabled":[]}},"metadata":{},"organization_user_id":"[email protected]","organization_user_id_type":null,"version":1,"organization_id":"organization_id","id":"00019ba4-1561-4d55-a8ae-b8b1d203aeaa","created_at":"2019-11-05T16:24:34.450Z","updated_at":null},"events":[{"id":"747f7907-facb-4ddf-811f-e3eaa1df1d21","organization_id":"organization_id","created_at":"2019-11-05T16:24:34.450Z","user":{"organization_user_id":"[email protected]","id":"00019ba4-1561-4d55-a8ae-b8b1d203aeaa"},"source":{},"consents":{"purposes":[{"id":"OeWK1234","enabled":true,"preferences":[{"id":"commercial_communication","enabled":true,"channels":[{"id":"email","enabled":true}]}]}],"vendors":{"enabled":[],"disabled":[]}}}]}
7
{"user":{"consents":{"purposes":[{"id":"OeWK1234","enabled":true,"preferences":[{"id":"commercial_communication","enabled":true,"channels":[{"id":"email","enabled":true}]}]}],"vendors":{"enabled":[],"disabled":[]}},"metadata":{},"organization_user_id":"[email protected]","organization_user_id_type":null,"version":1,"organization_id":"organization_id","id":"00019ba4-1561-4d55-a8ae-b8b1d203aeaa","created_at":"2019-11-05T16:24:34.450Z","updated_at":null},"events":[{"id":"747f7907-facb-4ddf-811f-e3eaa1df1d21","organization_id":"organization_id","created_at":"2019-11-05T16:24:34.450Z","user":{"organization_user_id":"[email protected]","id":"00019ba4-1561-4d55-a8ae-b8b1d203aeaa"},"source":{},"consents":{"purposes":[{"id":"OeWK1234","enabled":true,"preferences":[{"id":"commercial_communication","enabled":true,"channels":[{"id":"email","enabled":true}]}]}],"vendors":{"enabled":[],"disabled":[]}}}]}
8
{"user":{"consents":{"purposes":[{"id":"OeWK1234","enabled":true,"preferences":[{"id":"commercial_communication","enabled":true,"channels":[{"id":"email","enabled":true}]}]}],"vendors":{"enabled":[],"disabled":[]}},"metadata":{},"organization_user_id":"[email protected]","organization_user_id_type":null,"version":1,"organization_id":"organization_id","id":"00019ba4-1561-4d55-a8ae-b8b1d203aeaa","created_at":"2019-11-05T16:24:34.450Z","updated_at":null},"events":[{"id":"747f7907-facb-4ddf-811f-e3eaa1df1d21","organization_id":"organization_id","created_at":"2019-11-05T16:24:34.450Z","user":{"organization_user_id":"[email protected]","id":"00019ba4-1561-4d55-a8ae-b8b1d203aeaa"},"source":{},"consents":{"purposes":[{"id":"OeWK1234","enabled":true,"preferences":[{"id":"commercial_communication","enabled":true,"channels":[{"id":"email","enabled":true}]}]}],"vendors":{"enabled":[],"disabled":[]}}}]}
9
{"user":{"consents":{"purposes":[{"id":"OeWK1234","enabled":true,"preferences":[{"id":"commercial_communication","enabled":true,"channels":[{"id":"email","enabled":true}]}]}],"vendors":{"enabled":[],"disabled":[]}},"metadata":{},"organization_user_id":"[email protected]","organization_user_id_type":null,"version":1,"organization_id":"organization_id","id":"00019ba4-1561-4d55-a8ae-b8b1d203aeaa","created_at":"2019-11-05T16:24:34.450Z","updated_at":null},"events":[{"id":"747f7907-facb-4ddf-811f-e3eaa1df1d21","organization_id":"organization_id","created_at":"2019-11-05T16:24:34.450Z","user":{"organization_user_id":"[email protected]","id":"00019ba4-1561-4d55-a8ae-b8b1d203aeaa"},"source":{},"consents":{"purposes":[{"id":"OeWK1234","enabled":true,"preferences":[{"id":"commercial_communication","enabled":true,"channels":[{"id":"email","enabled":true}]}]}],"vendors":{"enabled":[],"disabled":[]}}}]}
10
{"user":{"consents":{"purposes":[{"id":"OeWK1234","enabled":true,"preferences":[{"id":"commercial_communication","enabled":true,"channels":[{"id":"email","enabled":true}]}]}],"vendors":{"enabled":[],"disabled":[]}},"metadata":{},"organization_user_id":"[email protected]","organization_user_id_type":null,"version":1,"organization_id":"organization_id","id":"00019ba4-1561-4d55-a8ae-b8b1d203aeaa","created_at":"2019-11-05T16:24:34.450Z","updated_at":null},"events":[{"id":"747f7907-facb-4ddf-811f-e3eaa1df1d21","organization_id":"organization_id","created_at":"2019-11-05T16:24:34.450Z","user":{"organization_user_id":"[email protected]","id":"00019ba4-1561-4d55-a8ae-b8b1d203aeaa"},"source":{},"consents":{"purposes":[{"id":"OeWK1234","enabled":true,"preferences":[{"id":"commercial_communication","enabled":true,"channels":[{"id":"email","enabled":true}]}]}],"vendors":{"enabled":[],"disabled":[]}}}]}
Copied!

Proofs

Structure

Didomi exports proofs in a proofs/ folder as a proofs.tar.gz archive.
Example: /data/export-id={batch export ID}/date={YYYY-MM-DD}/proofs/
For every export, the proofs file is split up into files of up to 4GB with the naming convention proofs.tar.gz.XY where XY is a number indicating the split number. For instance, if the total size of the proofs is 12GB, three files will be generated (proofs.tar.gz.00, proofs.tar.gz.01, proofs.tar.gz.02).
To be able to extract the proofs, you need to join the different files together to generate the original proofs.tar.gz archive:
1
# Join all parts of the proofs archive together
2
cat proofs.tar.gz.* > proofs.tar.gz
3
4
# Extract the proofs
5
tar -xvf proofs.tar.gz
Copied!
Additionally, a file named _SUCCESS is created once the export is complete. Do not read files from a partition until that file is created as you might get partial records.

Content

The files exported by Didomi contain proofs for the period covered by the export. Every file is named after the proof ID that is present in the consent events.

Configuration

Last modified 2mo ago