Table of Contents

Class BatchFileDescription

Namespace
DatabentoDotNet.Historical
Assembly
DatabentoDotNet.Historical.dll

One file belonging to a batch job.

public sealed record BatchFileDescription : IEquatable<BatchFileDescription>
Inheritance
BatchFileDescription
Implements
Inherited Members

Remarks

Port of upstream's BatchFileDesc (batch.rs:606-616), spelt out rather than abbreviated. Returned by ListFilesAsync(string, CancellationToken), one entry per file the job produced — which includes the three metadata files Databento packages with every job (manifest.json, metadata.json and condition.json) as well as the data itself.

Properties

Filename

The file's name, without any directory part.

public required string Filename { get; init; }

Property Value

string

Remarks

What Filename names a single file by, and the name the file is written under inside the job's output directory. It is server-supplied, so DownloadAsync(DownloadParams, CancellationToken) refuses one carrying a path separator rather than letting it choose where the file lands.

Hash

The file's checksum, as {algorithm}:{hex} — in practice sha256:….

public required string Hash { get; init; }

Property Value

string

Remarks

A single string rather than two fields, because that is what the wire carries. #39's probe of batch.list_files found every file in every job spelt sha256:48eebdccd96e5670…; upstream splits on the first colon and treats an algorithm it does not know as a reason to skip verification rather than to fail (batch.rs:255-266).

This library keeps that behaviour and makes it audible, because it silently downgrades the guarantee a mismatch otherwise carries. See DownloadAsync(DownloadParams, CancellationToken).

Size

The file's size in bytes.

public required ulong Size { get; init; }

Property Value

ulong

Remarks

The number a resumed download compares the bytes already on disk against — see DownloadAsync(DownloadParams, CancellationToken) for the three cases and what each does.

Urls

Where the file can be fetched from, keyed by protocol — https and ftp.

public required IReadOnlyDictionary<string, string> Urls { get; init; }

Property Value

IReadOnlyDictionary<string, string>

Remarks

A map rather than a single URL, because the API sends one: {"https":"…","ftp":"ftp://…"}. This library uses the https entry and errors when it is absent, as upstream does (batch.rs:216-218); nothing here speaks FTP.

Only the URL's path is used, and that is upstream's behaviour rather than a simplification. #39 probed what the API actually returns: the https URL points at api.databento.com while the API itself is reached at hist.databento.com — two different hosts. Upstream's get_with_path (client.rs:128-137) joins the path onto the configured base URL, discarding the returned host, and both hosts were measured to serve the same bytes for the same path. See DownloadAsync(DownloadParams, CancellationToken) for why keeping that matters beyond fidelity.