ORE Studio 0.0.4
Loading...
Searching...
No Matches
publication.hpp
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 *
3 * Copyright (C) 2025 Marco Craveiro <marco.craveiro@gmail.com>
4 *
5 * This program is free software; you can redistribute it and/or modify it under
6 * the terms of the GNU General Public License as published by the Free Software
7 * Foundation; either version 3 of the License, or (at your option) any later
8 * version.
9 *
10 * This program is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
13 * details.
14 *
15 * You should have received a copy of the GNU General Public License along with
16 * this program; if not, write to the Free Software Foundation, Inc., 51
17 * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 *
19 */
20#ifndef ORES_DQ_DOMAIN_PUBLICATION_HPP
21#define ORES_DQ_DOMAIN_PUBLICATION_HPP
22
23#include <chrono>
24#include <cstdint>
25#include <string>
26#include <boost/uuid/uuid.hpp>
27#include "ores.dq/domain/publication_mode.hpp"
28
29namespace ores::dq::domain {
30
37struct publication final {
41 boost::uuids::uuid id;
42
46 boost::uuids::uuid dataset_id;
47
54 std::string dataset_code;
55
59 publication_mode mode = publication_mode::upsert;
60
64 std::string target_table;
65
69 std::uint64_t records_inserted = 0;
70
74 std::uint64_t records_updated = 0;
75
79 std::uint64_t records_skipped = 0;
80
84 std::uint64_t records_deleted = 0;
85
89 std::string published_by;
90
94 std::chrono::system_clock::time_point published_at;
95};
96
97}
98
99#endif
Audit record for a dataset publication event.
Definition publication.hpp:37
std::uint64_t records_inserted
Number of records inserted during publication.
Definition publication.hpp:69
std::uint64_t records_skipped
Number of records skipped during publication.
Definition publication.hpp:79
std::string published_by
Username of the person who initiated the publication.
Definition publication.hpp:89
publication_mode mode
Publication mode used for this operation.
Definition publication.hpp:59
std::string target_table
Name of the production table that received the data.
Definition publication.hpp:64
boost::uuids::uuid id
Unique identifier for this publication record.
Definition publication.hpp:41
std::uint64_t records_deleted
Number of records deleted during publication.
Definition publication.hpp:84
std::chrono::system_clock::time_point published_at
Timestamp when the publication occurred.
Definition publication.hpp:94
std::string dataset_code
Code of the dataset that was published.
Definition publication.hpp:54
std::uint64_t records_updated
Number of records updated during publication.
Definition publication.hpp:74
boost::uuids::uuid dataset_id
ID of the dataset that was published.
Definition publication.hpp:46