Skip to main content

what_if_analysis

Creates, updates, deletes, gets or lists a what_if_analysis resource.

Overview

Namewhat_if_analysis
TypeResource
Idaws.forecast.what_if_analysis

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
creation_timestring (date-time)When the what-if analysis was created.
estimated_time_remaining_in_minutesinteger (int64)The approximate time remaining to complete the what-if analysis, in minutes.
forecast_arnstringThe Amazon Resource Name (ARN) of the what-if forecast. (pattern: <code>arn:([a-z\d-]+):forecast:.:.:.+</code>)
last_modification_timestring (date-time)The last time the resource was modified. The timestamp depends on the status of the job: CREATE_PENDING - The CreationTime. CREATE_IN_PROGRESS - The current timestamp. CREATE_STOPPING - The current timestamp. CREATE_STOPPED - When the job stopped. ACTIVE or CREATE_FAILED - When the job finished or failed.
messagestringIf an error occurred, an informational message about the error.
statusstringThe status of the what-if analysis. States include: ACTIVE CREATE_PENDING, CREATE_IN_PROGRESS, CREATE_FAILED CREATE_STOPPING, CREATE_STOPPED DELETE_PENDING, DELETE_IN_PROGRESS, DELETE_FAILED The Status of the what-if analysis must be ACTIVE before you can access the analysis. (pattern: <code>^[a-zA-Z0-9_]+$</code>)
time_series_selectorobjectDefines the set of time series that are used to create the forecasts in a TimeSeriesIdentifiers object. The TimeSeriesIdentifiers object needs the following information: DataSource Format Schema
what_if_analysis_arnstringThe Amazon Resource Name (ARN) of the what-if analysis. (pattern: <code>arn:([a-z\d-]+):forecast:.:.:.+</code>)
what_if_analysis_namestringThe name of the what-if analysis. (pattern: <code>^[a-zA-Z][a-zA-Z0-9_]*</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_what_if_analysisselectregionDescribes the what-if analysis created using the CreateWhatIfAnalysis operation. In addition to listing the properties provided in the CreateWhatIfAnalysis request, this operation lists the following properties: CreationTime LastModificationTime Message - If an error occurred, information about the error. Status
create_what_if_analysisinsertregion, WhatIfAnalysisName, ForecastArnWhat-if analysis is a scenario modeling technique where you make a hypothetical change to a time series and compare the forecasts generated by these changes against the baseline, unchanged time series. It is important to remember that the purpose of a what-if analysis is to understand how a forecast can change given different modifications to the baseline time series. For example, imagine you are a clothing retailer who is considering an end of season sale to clear space for new styles. After creating a baseline forecast, you can use a what-if analysis to investigate how different sales tactics might affect your goals. You could create a scenario where everything is given a 25% markdown, and another where everything is given a fixed dollar markdown. You could create a scenario where the sale lasts for one week and another where the sale lasts for one month. With a what-if analysis, you can compare many different scenarios against each other. Note that a what-if analysis is meant to display what the forecasting model has learned and how it will behave in the scenarios that you are evaluating. Do not blindly use the results of the what-if analysis to make business decisions. For instance, forecasts might not be accurate for novel scenarios where there is no reference available to determine whether a forecast is good. The TimeSeriesSelector object defines the items that you want in the what-if analysis.
delete_what_if_analysisdeleteregionDeletes a what-if analysis created using the CreateWhatIfAnalysis operation. You can delete only what-if analyses that have a status of ACTIVE or CREATE_FAILED. To get the status, use the DescribeWhatIfAnalysis operation. You can't delete a what-if analysis while any of its forecasts are being exported.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Describes the what-if analysis created using the CreateWhatIfAnalysis operation. In addition to listing the properties provided in the CreateWhatIfAnalysis request, this operation lists the following properties: CreationTime LastModificationTime Message - If an error occurred, information about the error. Status

SELECT
creation_time,
estimated_time_remaining_in_minutes,
forecast_arn,
last_modification_time,
message,
status,
time_series_selector,
what_if_analysis_arn,
what_if_analysis_name
FROM aws.forecast.what_if_analysis
WHERE region = '{{ region }}' -- required
;

INSERT examples

What-if analysis is a scenario modeling technique where you make a hypothetical change to a time series and compare the forecasts generated by these changes against the baseline, unchanged time series. It is important to remember that the purpose of a what-if analysis is to understand how a forecast can change given different modifications to the baseline time series. For example, imagine you are a clothing retailer who is considering an end of season sale to clear space for new styles. After creating a baseline forecast, you can use a what-if analysis to investigate how different sales tactics might affect your goals. You could create a scenario where everything is given a 25% markdown, and another where everything is given a fixed dollar markdown. You could create a scenario where the sale lasts for one week and another where the sale lasts for one month. With a what-if analysis, you can compare many different scenarios against each other. Note that a what-if analysis is meant to display what the forecasting model has learned and how it will behave in the scenarios that you are evaluating. Do not blindly use the results of the what-if analysis to make business decisions. For instance, forecasts might not be accurate for novel scenarios where there is no reference available to determine whether a forecast is good. The TimeSeriesSelector object defines the items that you want in the what-if analysis.

INSERT INTO aws.forecast.what_if_analysis (
WhatIfAnalysisName,
ForecastArn,
TimeSeriesSelector,
Tags,
region
)
SELECT
'{{ WhatIfAnalysisName }}' /* required */,
'{{ ForecastArn }}' /* required */,
'{{ TimeSeriesSelector }}',
'{{ Tags }}',
'{{ region }}'
RETURNING
what_if_analysis_arn
;

DELETE examples

Deletes a what-if analysis created using the CreateWhatIfAnalysis operation. You can delete only what-if analyses that have a status of ACTIVE or CREATE_FAILED. To get the status, use the DescribeWhatIfAnalysis operation. You can't delete a what-if analysis while any of its forecasts are being exported.

DELETE FROM aws.forecast.what_if_analysis
WHERE region = '{{ region }}' --required
;