---
title: Network Source Forecast
slug: network-source-forecast
docTags: 
createdAt: 2023-10-11T07:15:22.517Z
---

A network source forecast describes time-based inflow from a third-party source into a network, for network optimization and forecasting. The source could be a well, satellite, pipe, etc. It delivers a constant rate into the network based on the data in this table.

This table is used when wells or satellites flow into a network but are not actively modeled by the Xecta system.

The unique constraint on network source forecast entries is **sourceNetworkId + sourceNetworkSourceId + forecastValidDate + date**.

| **Variable**          | **Data Type**  | **Unit of Measure** | **Is Nullable?** | **Default Value** | **Description**                                                                                                                   |
| --------------------- | -------------- | ------------------- | ---------------- | ----------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| sourceNetworkId       | String         | -                   | No               | -                 | Source ID of the [Network Header](docId\:irXj-Rg5lEh701vW2okjL)                                                                   |
| sourceNetworkSourceId | String         | -                   | No               | -                 | Source ID of the [Network Source Definition](docId\:aQLrn950Hbs9fPXt5PAhX) the forecast applies to                                |
| forecastValidDate     | DateTimeOffset | -                   | No               | -                 | Date of forecast generation for the source. Datetime offset (with timezone) in ISO 8601 format. Example: 2022-09-27T16:28:37+0000 |
| date                  | DateTimeOffset | -                   | No               | -                 | Date of the forecasted rates. Datetime offset (with timezone) in ISO 8601 format.                                                 |
| oilRate               | Double         | STB/d               | Yes              | -                 | Forecasted oil rate                                                                                                               |
| gasRate               | Double         | Mscf/d              | Yes              | -                 | Forecasted gas rate                                                                                                               |
| waterRate             | Double         | STB/d               | Yes              | -                 | Forecasted water rate                                                                                                             |

:::hint{type="info"}
**ForecastValidDate Notes**

Forward-looking forecasts are generated at multiple points in time. The forecast valid date lets the system select the appropriate forecast for a network source for a given Xecta model run date.

As third-party network source forecasts are generated, they are inserted row-by-row keyed on the record **date**, and the **forecastValidDate** reference is required to discern multiple forecasts over time for a given source.
:::

***

# Data Integrity Checks

| **Condition**                                   | **Response**    |
| ----------------------------------------------- | --------------- |
| Any non-nullable field is NULL or empty         | Record Rejected |
| sourceNetworkId does not match a Network Header | Record Rejected |

***

# Common Error Messages

| **API**               | **Scenario**            | **Error Response**                      |
| --------------------- | ----------------------- | --------------------------------------- |
| Add / Upsert forecast | Unknown sourceNetworkId | network was not found for source id xxx |
