Configuration File
The .pd4castrrc.json file is the central configuration for your model project.
It lives at the root of your model directory and defines everything the platform
needs to know about your model: its identity, inputs, outputs, sensitivities,
and scheduling behavior. The CLI validates this file against a schema on every
command.
File location and format
The configuration file must be named .pd4castrrc.json and placed at the root
of your model project. It uses standard JSON format. You can generate a starter
config by running pd4castr init, which scaffolds a new project from a
template.
You can point the CLI to a different config file using the -c or --config
flag on any command:
pd4castr test -c .pd4castrrc.staging.jsonComplete field reference
Top-level fields
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | Yes | — | Display name for the model. |
forecastVariable | string | Yes | — | The variable being forecast. Currently only "price" is supported. |
timeHorizon | string | Yes | — | Forecast time horizon: "day_ahead", "week_ahead", "quarterly", or "historical". |
displayTimezone | string | No | Australia/Brisbane | IANA timezone string used for display in pdView. |
public | boolean | No | false | Whether the model is visible to other organizations. |
runMode | string | No | — | How runs are triggered: "AUTOMATIC" or "ON_DEMAND". See Run modes. |
runDatetimeQuery | string or null | No | null | Path to a SQL file for custom run datetime. See Custom run datetime. |
metadata | object | No | {} | Freeform key-value metadata (for example, description, resolution, feature lists). |
Inputs
The inputs array defines the data your model consumes. Each entry has the
following fields:
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
key | string | Yes | — | Identifier for this input. Becomes INPUT_<KEY>_URL in the container. |
trigger | string | Yes | — | "WAIT_FOR_LATEST_FILE" or "USE_MOST_RECENT_FILE". |
inputSource | string | No | Default shared source | UUID of the storage bucket source, provided by the pd4castr team. |
uploadFileFormat | string | No | "json" | Format of the uploaded file: "json", "csv", or "parquet". |
targetFileFormat | string | No | "json" | Format served to the container. Converted automatically if different from uploadFileFormat. |
For inputs with automatic data fetching, add a fetcher block:
| Field | Type | Required | Description |
|---|---|---|---|
fetcher.type | string | Yes | Data source type. Currently only "AEMO_MMS". |
fetcher.checkInterval | number | Yes | Polling interval in seconds. Minimum 60. |
fetcher.config.checkQuery | string | Yes | Path to SQL file that checks for new data. |
fetcher.config.fetchQuery | string | Yes | Path to SQL file that retrieves the data. |
See Model inputs for detailed explanations.
Outputs
The outputs array defines the schema of your model’s forecast data.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | Yes | — | Column name. Must include forecast_datetime. |
type | string | Yes | — | Data type: "float", "integer", "string", "date", "boolean", or "unknown". |
seriesKey | boolean | Yes | — | If true, this column is a categorical series key for chart grouping. |
colour | string | No | — | Hex colour code (#RRGGBB) for this series in pdView charts. |
See Model outputs for detailed explanations.
Sensitivities
The sensitivities array defines alternative scenario runs. Each entry has the
following fields:
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Display name for the scenario, shown in the pdView sidebar. |
query | string | Yes | Path to a SQL file that transforms the input data. |
See Sensitivities and scenarios for detailed explanations.
Input aggregations
The inputAggregations array defines summary views of input data displayed
below the forecast chart.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | Yes | — | Display name for the aggregation chart. |
query | string | Yes | — | Path to a SQL file that aggregates input data. |
description | string | No | "" | Tooltip text shown in pdView. |
colours | string[] | No | [] | Array of hex colour strings for chart series. |
See Sensitivities and scenarios for detailed explanations.
System-managed fields
These fields are prefixed with $$ and are managed automatically by the CLI.
Do not modify them manually.
| Field | Type | Description |
|---|---|---|
$$id | string or null | Model UUID, set after the first publish. |
$$modelGroupID | string or null | Model group UUID, set after the first publish. |
$$revision | number or null | Revision number (0, 1, 2, …), set and incremented on publish. |
$$dockerImage | string or null | Full Docker image reference, set on publish. |
These fields are written back to your .pd4castrrc.json during
pd4castr publish. Commit the updated file to version control so your project
stays in sync with the platform.
SQL file paths
All query paths in the configuration (fetcher queries, sensitivity queries,
input aggregation queries, and runDatetimeQuery) are relative to the project
root. The CLI reads these files and inlines the SQL content when you publish.
Full example
Here’s a complete .pd4castrrc.json for a day-ahead price forecast model with
fetched inputs, output series, and input aggregations:
{
"name": "Day Ahead Price Forecast",
"forecastVariable": "price",
"timeHorizon": "day_ahead",
"displayTimezone": "Australia/Brisbane",
"public": false,
"runMode": "AUTOMATIC",
"runDatetimeQuery": "queries/run-datetime.sql",
"metadata": {
"resolution": "30min",
"description": "30-minute day-ahead electricity price forecast"
},
"inputs": [
{
"key": "dispatch_price",
"trigger": "WAIT_FOR_LATEST_FILE",
"uploadFileFormat": "json",
"targetFileFormat": "json",
"fetcher": {
"type": "AEMO_MMS",
"checkInterval": 300,
"config": {
"checkQuery": "queries/data-fetchers/dispatch-price-check.sql",
"fetchQuery": "queries/data-fetchers/dispatch-price-fetch.sql"
}
}
},
{
"key": "regional_boundaries",
"trigger": "USE_MOST_RECENT_FILE",
"uploadFileFormat": "csv",
"targetFileFormat": "csv"
}
],
"outputs": [
{
"name": "forecast_datetime",
"type": "date",
"seriesKey": false
},
{
"name": "NSW1",
"type": "float",
"seriesKey": true,
"colour": "#84EDDC"
},
{
"name": "QLD1",
"type": "float",
"seriesKey": true,
"colour": "#FD4E4E"
},
{
"name": "SA1",
"type": "float",
"seriesKey": true,
"colour": "#FED600"
},
{
"name": "TAS1",
"type": "float",
"seriesKey": true,
"colour": "#40A967"
},
{
"name": "VIC1",
"type": "float",
"seriesKey": true,
"colour": "#1965C6"
}
],
"sensitivities": [
{
"name": "High Demand (+10%)",
"query": "queries/sensitivities/high-demand.sql"
}
],
"inputAggregations": [
{
"name": "Native Demand",
"query": "queries/input-aggregations/native-demand.sql",
"description": "Regional demand by demand_and_nonshedgen",
"colours": ["#008000", "#009900", "#00B300", "#00CC00", "#00E600"]
}
]
}Note: The
$$id,$$modelGroupID,$$revision, and$$dockerImagefields are omitted here because they’re set automatically after you runpd4castr publishfor the first time.
Next steps
- Model inputs — Detailed guide to input configuration and data fetchers.
- Model outputs — How to define your output schema.
- Sensitivities and scenarios — Scenario analysis and input aggregations.
- Testing your model — Local validation workflow.
- Publishing — How to ship your model.
- Run modes and scheduling — Automatic and on-demand triggering.