create_what_if_forecast
¶
create_what_if_forecast(
what_if_forecast_name: Name,
what_if_analysis_arn: Arn,
*,
config_overrides: Optional[forecastClientConfig] = None,
time_series_transformations: Optional[TimeSeriesTransformations] = None,
time_series_replacements_data_source: Optional[
TimeSeriesReplacementsDataSource
] = None,
tags: Optional[Tags] = None,
) -> CreateWhatIfForecastResponse
A what-if forecast is a forecast that is created from a modified version of the baseline forecast. Each what-if forecast incorporates either a replacement dataset or a set of transformations to the original dataset.
Parameters:
-
what_if_forecast_name(Name) –The name of the what-if forecast. Names must be unique within each what-if analysis.
-
what_if_analysis_arn(Arn) –The Amazon Resource Name (ARN) of the what-if analysis.
-
time_series_transformations(Optional[TimeSeriesTransformations], default:None) –The transformations that are applied to the baseline time series. Each transformation contains an action and a set of conditions. An action is applied only when all conditions are met. If no conditions are provided, the action is applied to all items.
-
time_series_replacements_data_source(Optional[TimeSeriesReplacementsDataSource], default:None) –The replacement time series dataset, which contains the rows that you want to change in the related time series dataset. A replacement time series does not need to contain all rows that are in the baseline related time series. Include only the rows (measure-dimension combinations) that you want to include in the what-if forecast.
This dataset is merged with the original time series to create a transformed dataset that is used for the what-if analysis.
This dataset should contain the items to modify (such as item_id or workforce_type), any relevant dimensions, the timestamp column, and at least one of the related time series columns. This file should not contain duplicate timestamps for the same time series.
Timestamps and item_ids not included in this dataset are not included in the what-if analysis.
-
tags(Optional[Tags], default:None) –A list of tags to apply to the what if forecast.
Raises:
-
InvalidInputException–We can't process the request because it includes an invalid value or a value that exceeds the valid range.
-
LimitExceededException–The limit on the number of resources per account has been exceeded.
-
ResourceAlreadyExistsException–There is already a resource with this name. Try again with a different name.
-
ResourceInUseException–The specified resource is in use.
-
ResourceNotFoundException–We can't find a resource with that Amazon Resource Name (ARN). Check the ARN and try again.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_forecast/_services/forecast.py
1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 | |