Metadata
The contents of the header of a DBN stream.
Fields
| Field | Type | Description |
|---|---|---|
version | std::uint8_t | The DBN schema version. |
dataset | std::string | The dataset code. |
schema | std::optional<Schema> | The data record schema. Will be nullopt for live data which can mix schemas. |
start | UnixNanos | The timestamp of the start of request time range (inclusive) expressed as the number nanoseconds since the UNIX epoch. |
end | UnixNanos | The timestamp of the end of request time range (exclusive) expressed as the number nanoseconds since the UNIX epoch. |
limit | std::uint64_t | The maximum number of records to return. |
stype_in | std::optional<SType> | |
stype_out | SType | The symbology type of output symbols. |
ts_out | bool | Whether the stream contains live data with the send timestamps appended to every record. |
symbol_cstr_len | std::size_t | The length of fixed-length symbol strings. |
symbols | std::vector<std::string> | The product symbols from the original request. |
partial | std::vector<std::string> | The symbols that did not resolve for at least one day in the query time range. |
not_found | std::vector<std::string> | The symbols that did not resolve for any day in the query time range. |
mappings | std::vector<SymbolMapping> | The symbol mappings for historical data. |
API method
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
struct MappingInterval {
date::year_month_day start_date;
date::year_month_day end_date;
std::string symbol;
};
struct SymbolMapping {
std::string raw_symbol;
std::vector<MappingInterval> intervals;
};
struct Metadata {
std::uint8_t version;
std::string dataset;
std::optional<Schema> schema;
UnixNanos start;
UnixNanos end;
std::uint64_t limit;
std::optional<SType> stype_in;
SType stype_out;
bool ts_out;
std::size_t symbol_cstr_len;
std::vector<std::string> symbols;
std::vector<std::string> partial;
std::vector<std::string> not_found;
std::vector<SymbolMapping> mappings;
}