Skip to main content

forecast_export_jobs

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

Overview

Nameforecast_export_jobs
TypeResource
Idaws.forecast.forecast_export_jobs

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
creation_timestring (date-time)When the forecast export job was created.
destinationobjectThe destination for an export job. Provide an S3 path, an Identity and Access Management (IAM) role that allows Amazon Forecast to access the location, and an Key Management Service (KMS) key (optional).
forecast_arnstringThe Amazon Resource Name (ARN) of the exported forecast. (pattern: <code>arn:([a-z\d-]+):forecast:.:.:.+</code>)
forecast_export_job_arnstringThe ARN of the forecast export job. (pattern: <code>arn:([a-z\d-]+):forecast:.:.:.+</code>)
forecast_export_job_namestringThe name of the forecast export job. (pattern: <code>^[a-zA-Z][a-zA-Z0-9_]*</code>)
formatstringThe format of the exported data, CSV or PARQUET. (pattern: <code>^CSV|PARQUET$</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 forecast export job. 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 forecast export job must be ACTIVE before you can access the forecast in your S3 bucket.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_forecast_export_jobselectregionDescribes a forecast export job created using the CreateForecastExportJob operation. In addition to listing the properties provided by the user in the CreateForecastExportJob request, this operation lists the following properties: CreationTime LastModificationTime Status Message - If an error occurred, information about the error.
list_forecast_export_jobsselectregionReturns a list of forecast export jobs created using the CreateForecastExportJob operation. For each forecast export job, this operation returns a summary of its properties, including its Amazon Resource Name (ARN). To retrieve the complete set of properties, use the ARN with the DescribeForecastExportJob operation. You can filter the list using an array of Filter objects.
create_forecast_export_jobinsertregion, ForecastExportJobName, ForecastArnExports a forecast created by the CreateForecast operation to your Amazon Simple Storage Service (Amazon S3) bucket. The forecast file name will match the following conventions: <ForecastExportJobName><ExportTimestamp><PartNumber> where the <ExportTimestamp> component is in Java SimpleDateFormat (yyyy-MM-ddTHH-mm-ssZ). You must specify a DataDestination object that includes an Identity and Access Management (IAM) role that Amazon Forecast can assume to access the Amazon S3 bucket. For more information, see aws-forecast-iam-roles. For more information, see howitworks-forecast. To get a list of all your forecast export jobs, use the ListForecastExportJobs operation. The Status of the forecast export job must be ACTIVE before you can access the forecast in your Amazon S3 bucket. To get the status, use the DescribeForecastExportJob operation.
delete_forecast_export_jobdeleteregionDeletes a forecast export job created using the CreateForecastExportJob operation. You can delete only export jobs that have a status of ACTIVE or CREATE_FAILED. To get the status, use the DescribeForecastExportJob operation.

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 a forecast export job created using the CreateForecastExportJob operation. In addition to listing the properties provided by the user in the CreateForecastExportJob request, this operation lists the following properties: CreationTime LastModificationTime Status Message - If an error occurred, information about the error.

SELECT
creation_time,
destination,
forecast_arn,
forecast_export_job_arn,
forecast_export_job_name,
format,
last_modification_time,
message,
status
FROM aws.forecast.forecast_export_jobs
WHERE region = '{{ region }}' -- required
;

INSERT examples

Exports a forecast created by the CreateForecast operation to your Amazon Simple Storage Service (Amazon S3) bucket. The forecast file name will match the following conventions: <ForecastExportJobName><ExportTimestamp><PartNumber> where the <ExportTimestamp> component is in Java SimpleDateFormat (yyyy-MM-ddTHH-mm-ssZ). You must specify a DataDestination object that includes an Identity and Access Management (IAM) role that Amazon Forecast can assume to access the Amazon S3 bucket. For more information, see aws-forecast-iam-roles. For more information, see howitworks-forecast. To get a list of all your forecast export jobs, use the ListForecastExportJobs operation. The Status of the forecast export job must be ACTIVE before you can access the forecast in your Amazon S3 bucket. To get the status, use the DescribeForecastExportJob operation.

INSERT INTO aws.forecast.forecast_export_jobs (
ForecastExportJobName,
ForecastArn,
Destination,
Tags,
Format,
region
)
SELECT
'{{ ForecastExportJobName }}' /* required */,
'{{ ForecastArn }}' /* required */,
'{{ Destination }}',
'{{ Tags }}',
'{{ Format }}',
'{{ region }}'
RETURNING
forecast_export_job_arn
;

DELETE examples

Deletes a forecast export job created using the CreateForecastExportJob operation. You can delete only export jobs that have a status of ACTIVE or CREATE_FAILED. To get the status, use the DescribeForecastExportJob operation.

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