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

Source: https://databento.com/docs/api-historical/helpers/batch-submit-job-params


### SubmitJobParams

The parameter struct and builder for [HistoricalClient::batch::submit_job](https://databento.com/docs/api-historical/batch/batch-submit-job.md).

The builder can be instantiated with the associated function `builder()`, and the struct is created from the builder with the `build()` method.
For every field, there is an identically named setter method on the builder.

#### API method

```rust
pub struct SubmitJobParams {
    pub dataset: String,
    pub symbols: Symbols,
    pub schema: Schema,
    pub date_time_range: DateTimeRange,
    pub encoding: Encoding,
    pub compression: Compression,
    pub pretty_px: bool,
    pub pretty_ts: bool,
    pub map_symbols: Option<bool>,
    pub split_symbols: bool,
    pub split_duration: SplitDuration,
    pub split_size: Option<NonZeroU64>,
    pub delivery: Delivery,
    pub stype_in: SType,
    pub stype_out: SType,
    pub limit: Option<NonZeroU64>,
}
```

#### Fields

| Parameter | Type | Description |
| `dataset` | String | The [dataset](https://databento.com/docs/api-historical/basics/datasets.md) code (string identifier). Must be one of the values from [list_datasets](https://databento.com/docs/api-historical/metadata/metadata-list-datasets.md). |
| `symbols` | Symbols | The product symbols to filter for. Takes up to 2,000 symbols per request. If `Symbols::All` then will select **all** symbols. |
| `schema` | Schema | The data record [schema](https://databento.com/docs/schemas/whats-a-schema.md). Must be one of the values from [list_schemas](https://databento.com/docs/api-historical/metadata/metadata-list-schemas.md). |
| `date_time_range` | DateTimeRange | The request range with an inclusive start and an exclusive end. Filters on `ts_recv` if it exists in the schema, otherwise `ts_event`. |
| `encoding` | Encoding | The data [encoding](https://databento.com/docs/api-historical/basics/encodings.md). Defaults to `Dbn`. |
| `compression` | Compression | The data [compression](https://databento.com/docs/api-historical/basics/compression.md) mode. For fastest transfer speed, `Zstd` is recommended. Defaults to `Zstd`. |
| `pretty_px` | bool | If prices should be formatted to the correct scale (using the fixed-precision scalar 1e-9). Only applicable for `Csv` or `Json` encodings. Defaults to `false`. |
| `pretty_ts` | bool | If timestamps should be formatted as ISO 8601 strings. Only applicable for `Csv` or `Json` encodings. Defaults to `false`. |
| `map_symbols` | Option\ | If a symbol field should be included with each text-encoded record. Defaults to `true` for `Csv` or `Json` encodings, and `false` for `Dbn`. |
| `split_symbols` | bool | If files should be split by raw symbol. Cannot be used with `limit`. Defaults to `false`. |
| `split_duration` | SplitDuration | The maximum time duration before batched data is split into multiple files. A week starts on Sunday UTC. `None` means no time-based splitting. Defaults to `Day`. |
| `split_size` | Option\ | The maximum size (in bytes) of each batched data file before being split. Must be an integer between 1e9 and 10e9 inclusive (1GB - 10GB). Defaults to `None`. |
| `delivery` | Delivery | The delivery mechanism for the batched data files once processed. Only `Download` is supported at this time. |
| `stype_in` | SType | The [symbology type](https://databento.com/docs/api-historical/basics/symbology.md) of input `symbols`. Defaults to `RawSymbol`. |
| `stype_out` | SType | The [symbology type](https://databento.com/docs/api-historical/basics/symbology.md) of output symbols. Defaults to `InstrumentId`. Must be a valid symbology combination with `stype_in`. See [symbology combinations](https://databento.com/docs/conventions/symbology.md#supported-symbology-combinations). |
| `limit` | Option\ | The maximum number of records to return. If `None` then no limit. Cannot be used with `split_symbols`. |

#### Example usage

```rust
use databento::{
    dbn::{Compression, Dataset, Encoding, SType, Schema},
    historical::batch::{
        Delivery, SplitDuration, SubmitJobParams,
    },
};
use time::macros::datetime;

assert_eq!(
    SubmitJobParams {
        dataset: "GLBX.MDP3".to_owned(),
        date_time_range: (datetime!(2019-01-01 00:00 UTC)
            ..datetime!(2020-09-03 00:00 UTC))
            .into(),
        symbols: vec!["CL.c.0", "NG.c.0"].into(),
        schema: Schema::Ohlcv1M,
        stype_in: SType::Continuous,
        stype_out: SType::InstrumentId,
        limit: None,
        encoding: Encoding::Csv,
        compression: Compression::None,
        pretty_px: true,
        pretty_ts: true,
        map_symbols: Some(true),
        split_symbols: false,
        split_duration: SplitDuration::Day,
        split_size: None,
        delivery: Delivery::Download,
    },
    SubmitJobParams::builder()
        .dataset(Dataset::GlbxMdp3)
        .symbols(vec!["CL.c.0", "NG.c.0"])
        .stype_in(SType::Continuous)
        .date_time_range(
            datetime!(2019-01-01 00:00 UTC)
                ..datetime!(2020-09-03 00:00 UTC)
        )
        .schema(Schema::Ohlcv1M)
        .encoding(Encoding::Csv)
        .compression(Compression::None)
        .pretty_px(true)
        .pretty_ts(true)
        .map_symbols(true)
        .build()
);
```
