---
type: concept
x-llmwiki:
  schemaVersion: "0.1"
  contentHash: 670da9c4132098ad5334bd919295d8e131e4f55a894bc77a514bc81344d9347e
  pageDirectory: concepts
  sources:
    - data-preparation-for-forecasting-databricks-on-aws.md
  confidence: 0.95
  provenanceState: extracted
  freshnessStatus: unverified
  aliases:
    - databricks-automl-forecasting-data-preparation
    - DAFDP
  citations:
    - file: data-preparation-for-forecasting-databricks-on-aws.md
title: Databricks AutoML Forecasting Data Preparation
description: Process and configurable settings for preparing time series data for automated forecasting model training on Databricks.
tags:
  - data-preparation
  - forecasting
  - automl
  - databricks
timestamp: "2026-06-19T18:06:11.155Z"
---

# Databricks AutoML Forecasting Data Preparation

**Databricks AutoML Forecasting Data Preparation** refers to the automatic data preprocessing steps that AutoML applies when training forecasting models, including feature type validation, missing value imputation, time series cross-validation for data splitting, and time series aggregation. These steps can be configured through the AutoML UI or API.

## Supported Data Feature Types

Only specific feature types are supported for forecasting tasks. Images are not supported. The supported types include: ^[data-preparation-for-forecasting-databricks-on-aws.md]

- **Numeric**: `ByteType`, `ShortType`, `IntegerType`, `LongType`, `FloatType`, and `DoubleType`
- **Boolean**
- **String**: Categorical or English text
- **Timestamps**: `TimestampType` and `DateType`
- **ArrayType[Numeric]**: Supported in Databricks Runtime 10.4 LTS ML and above
- **DecimalType**: Supported in Databricks Runtime 11.3 LTS ML and above

## Impute Missing Values

Starting in Databricks Runtime 10.4 LTS ML and above, you can specify how null values are imputed. In the UI, select a method from the drop-down in the **Impute with** column in the table schema. In the API, use the `imputers` parameter. By default, AutoML selects an imputation method based on the column type and content. ^[data-preparation-for-forecasting-databricks-on-aws.md]

If you specify a non-default imputation method, AutoML does not perform semantic type detection. ^[data-preparation-for-forecasting-databricks-on-aws.md]

## Split Forecasting Data into Train, Validation, and Test Sets

AutoML splits forecasting data into three splits for training, validation, and testing. For forecasting tasks, AutoML uses **time series cross-validation**. This method incrementally extends the training dataset chronologically and performs validation on subsequent time points. ^[data-preparation-for-forecasting-databricks-on-aws.md]

Cross-validation provides a robust evaluation of a model's performance over different segments of time. It ensures that the forecasting model is rigorously tested against unseen future data, maintaining the relevance and accuracy of predictions. ^[data-preparation-for-forecasting-databricks-on-aws.md]

The number of cross-validation folds depends on input table characteristics such as the number of time series, the presence of covariates, and the time series length. ^[data-preparation-for-forecasting-databricks-on-aws.md]

## Time Series Aggregation

For forecasting problems, when there are multiple values for a timestamp in a time series, AutoML uses the **average** of the values by default. ^[data-preparation-for-forecasting-databricks-on-aws.md]

To use the sum instead, edit the source code notebook generated by the trial runs. In the **Aggregate data by …** cell, change `.agg(y=(target_col, "avg"))` to `.agg(y=(target_col, "sum"))`: ^[data-preparation-for-forecasting-databricks-on-aws.md]

```python
group_cols = [time_col] + id_cols
df_aggregation = df_loaded \
  .groupby(group_cols) \
  .agg(y=(target_col, "sum")) \
  .reset_index() \
  .rename(columns={ time_col : "ds" })
```

## Configuration Options

You can adjust data preparation options during experiment setup in the AutoML UI. For configuring these settings using the [AutoML API](/concepts/automl-python-api.md), refer to the AutoML Python API reference. ^[data-preparation-for-forecasting-databricks-on-aws.md]

## Related Concepts

- [AutoML on Databricks](/concepts/automl-on-databricks.md)
- Forecasting with AutoML
- Time Series Analysis
- Data Imputation Techniques
- [Cross-Validation for Time Series](/concepts/rolling-window-backtesting.md)

## Sources

- data-preparation-for-forecasting-databricks-on-aws.md

# Citations

1. [data-preparation-for-forecasting-databricks-on-aws.md](/references/data-preparation-for-forecasting-databricks-on-aws-d40acbea.md)
