Available languages: [Python](https://databento.com/docs/api-historical/helpers/dbn-store-metadata.python.md) · [C++](https://databento.com/docs/api-historical/helpers/dbn-store-metadata.cpp.md) · [Rust](https://databento.com/docs/api-historical/helpers/dbn-store-metadata.rust.md) · [HTTP](https://databento.com/docs/api-historical/helpers/dbn-store-metadata.http.md)

Source: https://databento.com/docs/api-historical/helpers/dbn-store-metadata


### DbnStore::GetMetadata

Decodes the [DBN](https://databento.com/docs/conventions/databento-binary-encoding.md) metadata if it has not already been decoded and returns a reference to it.

#### API method

```cpp
const Metadata& GetMetadata();
```

#### Returns

`const Metadata&`

DBN [Metadata](https://databento.com/docs/api-historical/helpers/metadata.md) about the file.

#### Example usage

```cpp
#include <databento/historical.hpp>
#include <iostream>

using namespace databento;

auto client =
    Historical::Builder().SetKey("$YOUR_API_KEY").Build();
DbnStore dbn_store = client.TimeseriesGetRangeToFile(
    "XNAS.ITCH", {"2024-06-24", "2024-06-29"}, {"META"},
    Schema::Trades, "META_20240624-20240629.dbn.zst");
std::cout << dbn_store.GetMetadata() << '\n';
```
#### Example response

```plaintext
Metadata {
    version = 3,
    dataset = "XNAS.ITCH",
    schema = trades,
    start = 2024-06-24T00:00:00.000000000Z,
    end = 2024-06-29T00:00:00.000000000Z,
    limit = 0,
    stype_in = raw_symbol,
    stype_out = instrument_id,
    ts_out = false,
    symbol_cstr_len = 71,
    symbols = { "META" },
    partial = {},
    not_found = {},
    mappings = {
        SymbolMapping { raw_symbol = "META", intervals = { MappingInterval { start_date = 2024-06-24, end_date = 2024-06-29, symbol = "10451" } } }
    }
}
```
