Model Outputs

Your model produces forecast data by writing an output file to the platform. During a model run, your model must upload its results to the URL specified by the OUTPUT_URL environment variable using an HTTP PUT request. The platform processes this file, stores the forecast data, and makes it available in the pd4castr UI.

How Output Works

When your container finishes its forecast computation, it must upload the result to the OUTPUT_URL environment variable. This is a standard HTTP PUT request with the output file as the request body.

The output file format is configured at the model level using the outputFileFormat field in .pd4castrrc.json. Supported formats are json, csv, and parquet. If you don’t specify a format, JSON is used by default.

Required Output

Every data point in your output must contain a forecast_datetime value. This value should be an ISO 8601 datetime string, and will be used as the x-axis of the forecast chart in the pd4castr UI.

Output Variables Configuration

The outputs array in .pd4castrrc.json defines the schema of your output data. Each entry describes one column in the output file.

FieldTypeRequiredDescription
namestringYesDisplay name for this output variable. This will be shown in the pd4castr UI.
keystringYesStable identifier for this output variable. Must be lowercase alphanumeric (with hyphens/underscores). Must be unique within the model.
typestringYesData type: float, integer, string, date, boolean.
seriesKeybooleanYesWhether this column is a categorical series key. Series keys split data into separate chart lines.
colourstringNoHex colour code (#RRGGBB) for this series in the forecast chart.

Series Keys

Columns marked with "seriesKey": true act as categorical identifiers that determine how the data is split into chart series in the pd4castr UI. For example, a price forecast model covering multiple energy regions might define each region (NSW, QLD, SA) as a series key. Each unique value in a series key column becomes a separate line on the forecast chart.

The key field

The key field is the stable identifier used to match output data across republishes. When you modify an output variable (for example, change the name field), keep the key the same so historical run data continues to display correctly.

How Outputs Appear in the Platform

Output columns map directly to what users see in the pd4castr UI:

  • Series key outputs create separate lines or categories on the forecast chart. Each unique value gets its own line with the specified colour.
  • The forecast chart displays data over time, using forecast_datetime as the x-axis.

Example

Here’s a complete outputs configuration for a price forecast model that covers five Australian energy regions:

{
  "outputs": [
    {
      "name": "NSW1",
      "key": "nsw1",
      "type": "float",
      "seriesKey": true,
      "colour": "#84EDDC"
    },
    {
      "name": "QLD1",
      "key": "qld1",
      "type": "float",
      "seriesKey": true,
      "colour": "#FD4E4E"
    },
    {
      "name": "SA1",
      "key": "sa1",
      "type": "float",
      "seriesKey": true,
      "colour": "#FED600"
    },
    {
      "name": "TAS1",
      "key": "tas1",
      "type": "float",
      "seriesKey": true,
      "colour": "#40A967"
    },
    {
      "name": "VIC1",
      "key": "vic1",
      "type": "float",
      "seriesKey": true,
      "colour": "#1965C6"
    }
  ]
}

In this example, each region column is a series key with a distinct colour. The pd4castr UI renders five separate lines on the forecast chart, one per region, each in the specified colour.

Next Steps

  • See the Configuration File reference for all output field details.
  • Learn about Sensitivities to run alternative versions of your model with modified inputs.