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_API_DOMAIN_PUBLICATION_HPP
21#define ORES_DQ_API_DOMAIN_PUBLICATION_HPP
22
23#include <chrono>
24#include <cstdint>
25#include <string>
26#include <boost/uuid/uuid.hpp>
27#include "ores.dq.api/domain/publication_mode.hpp"
28
29namespace ores::dq::domain {
30
37struct publication final {
41 boost::uuids::uuid id;
42
46 std::string tenant_id;
47
51 boost::uuids::uuid dataset_id;
52
59 std::string dataset_code;
60
64 publication_mode mode = publication_mode::upsert;
65
69 std::string target_table;
70
74 std::uint64_t records_inserted = 0;
75
79 std::uint64_t records_updated = 0;
80
84 std::uint64_t records_skipped = 0;
85
89 std::uint64_t records_deleted = 0;
90
94 std::string published_by;
95
99 std::chrono::system_clock::time_point published_at;
100};
101
102}
103
104#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:74
std::uint64_t records_skipped
Number of records skipped during publication.
Definition publication.hpp:84
std::string published_by
Username of the person who initiated the publication.
Definition publication.hpp:94
publication_mode mode
Publication mode used for this operation.
Definition publication.hpp:64
std::string target_table
Name of the production table that received the data.
Definition publication.hpp:69
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:89
std::chrono::system_clock::time_point published_at
Timestamp when the publication occurred.
Definition publication.hpp:99
std::string dataset_code
Code of the dataset that was published.
Definition publication.hpp:59
std::uint64_t records_updated
Number of records updated during publication.
Definition publication.hpp:79
std::string tenant_id
Tenant identifier for multi-tenancy isolation.
Definition publication.hpp:46
boost::uuids::uuid dataset_id
ID of the dataset that was published.
Definition publication.hpp:51