# DataSourceJobV2

Schema: #/components/schemas/DataSourceJobV2

Method: SCHEMA
Version: 1.0.0
Security: bearer, appkey

## Schema fields:

  - `id` (string, required)
    The ULID of the data source job, used to poll the job status and, for external transformers, to set its final state.
    Example: 01JY6YFQ5F7MYPDM3TXCGG02N2

  - `dataSourceId` (string, required)
    The id of the resulting data source. Empty string until `dataSourceJobState` reaches `Succeeded`.
    Example: 01JY6YVV4QPRH7W4TY64BXEDB6

  - `dataSourceType` (string, required)
    The resolved data source type - the `target.type`, or the full data source type id (`source.type:source.store`) when source and target share a data type.
    Example: price-forecast

  - `dataSourceJobType` (string, required)
    The data source job type. `Process` when creating a new data source, `Reprocess` when rebuilding an existing one.
    Enum: "Process", "Reprocess"

  - `dataSourceJobState` (string, required)
    The current lifecycle state of the data source job or reprocess job.
* `Running`                 : the platform is staging inputs.
* `TransformationPending`   : a `transformation_required` cloud event has been emitted to the external transformer.
* `TransformationCompleted` : the external transformer reported success.
* `Succeeded`               : the platform has produced the data source (terminal).
* `Failed`                  : the job failed (terminal).
    Enum: "Succeeded", "Failed", "Running", "TransformationPending", "TransformationCompleted"

  - `dataSourceJobErrors` (array, required)
    Free-form platform-side error messages, kept distinct from the structured `transformationErrors` an external transformer may report when setting the job state.
    Example: ["scenario 01EFY17N9ED84BV4CHPTDAXZK1 of study 01EEST49N94JA6YJYC2KCMMPJ8 does not have any attached choices","scenario 1 of study 2 does not have any attached choices"]

