---
title: "Clean data automatically with blueprint rules"
description: "Default blueprint rules apply simple cleaning logic, such as date formatting, to help you prepare data"
url: https://docs.ovhcloud.com/es/guides/public-cloud/data-platform/connectors-analyzer-blueprint-rules
lang: es
lastUpdated: 2026-09-14
---
> For AI agents: the complete documentation index is available at https://docs.ovhcloud.com/es/llms.txt, the full documentation bundle is available at https://docs.ovhcloud.com/es/llms-full.txt.

# Clean data automatically with blueprint rules

## Objective

The Platform provides default "blueprint rules" which consist of simple cleaning logic (like dates formatting, thousands of separators, etc.) to help users run simple data preparation. You can choose from available transformations in the Platform store and apply them if the applied condition is met.

It is not mandatory to use blueprint rules when using the platform. If used, the rules will be added automatically to the [Data Processing Engine Load actions](https://docs.ovhcloud.com/es/guides/public-cloud/data-platform/dpe-actions-load.md) you will define to ingest the data inside your dataset.

## How a rule works

A rule applies to each line independently and allows several things.

If a condition is specified, the rule will apply only under certain conditions expressed in `condition` and `condition_value(s)`.

If a transformation is filled, the transformation action on each line will be performed, otherwise, it is considered to be a filtering rule (`keep`).

If no _condition_ is filled, the one set by default is `ALL`, which allows any line.

If no _transformation_ nor _condition_ is filled, then we consider it to be a _default transformation_. Otherwise, if no transformation is filled and there is one _condition_, the action by default is _keep_. The action applies only to lines that respond to the rule defined by _condition_.

### Fields

| Attribute name    | Required                                                                      | Example                             | Comment                           |
| ----------------- | ----------------------------------------------------------------------------- | ----------------------------------- | --------------------------------- |
| attribute\_name   | Yes if the format is a list, no if the format is an object                    | `ca_ttc`, `date`                    |                                   |
| condition         | No (defaults to `ALL`)                                                        | `EQUAL`, `IN`                       | See the condition list below      |
| condition\_value  | Yes, except if condition is `IN`, `NOT IN` or `ALL`                           | `1`, `"Categorie1"`                 |                                   |
| condition\_values | Yes if condition is `IN` or `NOT IN`                                          | `["ca_ttc", 2, 3]`, `["categorie"]` |                                   |
| action            | No                                                                            | `keep`, `concat`                    | See the transformation list below |
| action\_value     | Yes if action is `default` or `split`                                         | `1`, `"Categorie1"`                 |                                   |
| action\_values    | Yes, except if action is `default`, `split`, `action_error`, `keep` or `skip` | `["ca_ttc", 2, 3]`, `["categorie"]` |                                   |
| else\_value       | If the condition is not met, replaces the value by `else_value`               | `"ca2"`                             |                                   |

## Configure a blueprint rule

Rules require 3 steps to be configured:

1. **Information:** Name of the attribute
2. **Transformation:** If the condition is confirmed, which transformation action to apply to the data (can be chosen from the Platform store)
3. **Condition:** which rule to apply for the condition

To add a rule on an attribute, on the relevant field, click on the following button:

![analyzer](/images/public-cloud/data-platform/product/connectors/analyzer/picts/blueprint-1.png)
### Transformations

Different **transformations** are available in the Platform store:

![analyzer](/images/public-cloud/data-platform/product/connectors/analyzer/picts/blueprint-2.png)
- _Replace by_: Replaced values by a single value

- _Substring_: Values will be truncated

- _Date format_: Replace date formats

- _Keep line_: Keep matching values

- _Skip line_: Skip matching values

- _Throw error_: Matching values will trigger an error

- _Replace substring_: Replace matching substrings

- _Apply regexp_: A new regexp will be applied to matching values

- _Stop workflow_: Stop the ongoing workflow

### Conditions

Different **conditions** are available:

![analyzer](/images/public-cloud/data-platform/product/connectors/analyzer/picts/blueprint-3.png)
The Platform provides you a variety of Conditions you can apply to your chosen transformation. The list includes the following: _Equal_, _Not Equal_, _Between_, _Not Between_, _Lower than_, _Lower or Equal than_, _Greater than_, _Greater or Equal than_, _REGEXP_, _NOT REGEXP_, _Is a number_, _Is not a number_, _Is a date_, _Is not a date_, _Is null_, _Is not null_

:::info
Once the transformation and condition are set, the rule will be applied to the selected attribute.
:::

![analyzer](/images/public-cloud/data-platform/product/connectors/analyzer/picts/blueprint-4.png)
## Reference

The names below are the values written in the rule itself, so they are the ones you use when you edit rules as JSON, for example in the [Load advanced mode](https://docs.ovhcloud.com/es/guides/public-cloud/data-platform/dpe-actions-load-advanced-mode.md) or the [Aggregate advanced mode](https://docs.ovhcloud.com/es/guides/public-cloud/data-platform/dpe-actions-aggregate-advanced-mode.md).

:::details Condition list

| Condition's name | Description                                                                                                      |
| ---------------- | ---------------------------------------------------------------------------------------------------------------- |
| ALL              | Keeps all the lines                                                                                              |
| EQUAL            | Valid lines: those whose _attribute\_name_ is equal to _condition\_value_                                        |
| NOT EQUAL        | Valid lines: those whose _attribute\_name_ is not equal to _condition\_value_                                    |
| IN               | Valid lines: those whose _attribute\_name_ is in the list _condition\_values_                                    |
| NOT IN           | Valid lines: those whose _attribute\_name_ is not in the list _condition\_values_                                |
| LTE              | Valid lines: those whose _attribute\_name_ is lower or equal to _condition\_value_                               |
| LT               | Valid lines: those whose _attribute\_name_ is lower than _condition\_value_                                      |
| GTE              | Valid lines: those whose _attribute\_name_ is higher or equal to _condition\_value_                              |
| GT               | Valid lines: those whose _attribute\_name_ is higher than _condition\_value_                                     |
| REGEXP           | Valid lines: those whose _attribute\_name_ corresponds to the regexp _condition\_value_. Example: `^([0-9]{4})`  |
| NOT REGEXP       | Valid lines: those whose _attribute\_name_ does not correspond to the regexp _condition\_value_                  |
| BETWEEN          | Valid lines: those whose _attribute\_name_ is between _condition\_values\[0]_ and _condition\_values\[1]_        |
| NOT BETWEEN      | Valid lines: those whose _attribute\_name_ is not between _condition\_values\[0]_ and _condition\_values\[1]_    |
| OR               | Valid lines: those where one of the values contained in _condition\_values_ is not empty (empty, null, False, 0) |
| AND              | Valid lines: those where all values contained in _condition\_values_ are not empty (empty, null, False, 0)       |
| IS NULL          | Valid lines: those whose _attribute\_name_ is null                                                               |
| IS NOT NULL      | Valid lines: those whose _attribute\_name_ is not null                                                           |
| IS INT           | Valid lines: those whose _attribute\_name_ is an integer                                                         |
| IS NOT INT       | Valid lines: those whose _attribute\_name_ is not an integer                                                     |
| IS DATE          | Valid lines: those whose _attribute\_name_ is a date                                                             |
| IS NOT DATE      | Valid lines: those whose _attribute\_name_ is not a date                                                         |
| IS DEC           | Valid lines: those whose _attribute\_name_ is a decimal                                                          |
| IS NOT DEC       | Valid lines: those whose _attribute\_name_ is not a decimal                                                      |
| IS NUM           | Valid lines: those whose _attribute\_name_ is a number                                                           |
| IS NOT NUM       | Valid lines: those whose _attribute\_name_ is not a number                                                       |

:::

:::details Transformation list

- _keep_: Keep the line

- _skip_: Skip the line

- _default_:
  Replace the value by _action\_value_.
  For dates, there is:

  - `$today` returns yyyy-mm-dd
  - `$now` returns yyyy-mm-dd hh:mm:ss
  - `$yesterday` returns yyyy-mm-dd

- _regexp\_replace_:
  Replace the value corresponding to regexp _action\_values\[0]_ by _action\_values\[1]_

- _replace_:
  Replace the value corresponding to _action\_values\[0]_ by _action\_values\[1]_

- _substring / substr_:
  - If _action\_values\[0]_ >= 0:
    Starts at the \*action\_values\[0]\*th character

  - If _action\_values\[0]_ \< 0:
    Only takes into account the _action\_values\[0]_ last characters

  - If _action\_values\[1]_ is filled:
    The 2nd figure represents the max number of characters wanted

- _date\_replace_:
  Replace the date format _action\_values\[0]_ by _action\_values\[1]_.
  Examples for _action\_values_:

  - `["%d/%m/%Y", "%Y-%m-%d"]`
  - See the date format directives below

- _add_:
  Add several fields or hard numbers, automatically detecting if for each value of _action\_values_ it is an attribute available in the line, otherwise it is considered to be a number. Examples for _action\_values_:

  - `["ca_ht", "taxes"]`
  - `["nb_clics", 1]`

- _sub_: Substract _action\_values\[0]_ from all the other data present in _action\_values_

- _mul_: Multiply _action\_values\[0]_ by _action\_values\[1]_

- _div_: Divide _action\_values\[0]_ by _action\_values\[1]_

- _mod_: Modulo _action\_values\[0]_ by _action\_values\[1]_

- _concat_: Concatenate one or several fields with hard strings. Each element of _action\_values_ detects if it is the name of a column available in the line, if not we consider it to be a string of hard characters. Examples for _action\_values_:
  - `["site_name", " - ", "country"]`
  - `["civilite", " name", "lastname"]`

- _ceil_: Rounded up _action\_value_

- _floor_: Rounded down _action\_value_

- _disaggregate / split_:
  Used to create multiple lines if a field contains multiple values that should be split into separate lines.
  There can only be one _disaggregate_ rule per DPE action, and this rule always applies last.
  The field is split on the character _action\_value_, and for each split element only non-empty values are kept.

- _action\_error_: Leads to an error in the action, and consequently considers that all the lines are false

- _stop\_workflow_: Stop the workflow

:::

:::details Date format directives

| **Directive** | **Meaning**                                                                                                                                                                      | **Example**                      |
| ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- |
| %w            | Weekday as a decimal number, where 0 is Sunday and 6 is Saturday.                                                                                                                | 0, 1, ..., 6                     |
| %d            | Day of the month as a zero-padded decimal number.                                                                                                                                | 01, 02, ..., 31                  |
| %m            | Month as a zero-padded decimal number.                                                                                                                                           | 01, 02, ..., 12                  |
| %y            | Year without century as a zero-padded decimal number.                                                                                                                            | 00, 01, ..., 99                  |
| %Y            | Year with century as a decimal number.                                                                                                                                           | 1970, 1988, 2001, 2013           |
| %H            | Hour (24-hour clock) as a zero-padded decimal number.                                                                                                                            | 00, 01, ..., 23                  |
| %I            | Hour (12-hour clock) as a zero-padded decimal number.                                                                                                                            | 01, 02, ..., 12                  |
| %p            | Locale's equivalent of either AM or PM.                                                                                                                                          | AM, PM (en\_US); am, pm (de\_DE) |
| %M            | Minute as a zero-padded decimal number.                                                                                                                                          | 00, 01, ..., 59                  |
| %S            | Second as a zero-padded decimal number.                                                                                                                                          | 00, 01, ..., 59                  |
| %f            | Microsecond as a decimal number, zero-padded on the left.                                                                                                                        | 000000, 000001, ..., 999999      |
| %z            | UTC offset in the form +HHMM or -HHMM (empty string if the object is naive).                                                                                                     | (empty), +0000, -0400, +1030     |
| %Z            | Time zone name (empty string if the object is naive).                                                                                                                            | (empty), UTC, EST, CST           |
| %j            | Day of the year as a zero-padded decimal number.                                                                                                                                 | 001, 002, ..., 366               |
| %U            | Week number of the year (Sunday as the first day of the week) as a zero-padded decimal number. All days in a new year preceding the first Sunday are considered to be in week 0. | 00, 01, ..., 53                  |
| %W            | Week number of the year (Monday as the first day of the week) as a decimal number. All days in a new year preceding the first Monday are considered to be in week 0.             | 00, 01, ..., 53                  |
| %%            | A literal '%' character.                                                                                                                                                         | %                                |

:::

:::details Rule examples

Replace a date format:

```json
[
    {
        "attribute_name": "date",
        "action": "date_replace",
        "action_values": ["%d/%m/%Y", "%Y-%m-%d"]
    }
]
```

Add 1 to the _year_ attribute, only on the lines where it is 2015 or 2016:

```json
[
    {
        "attribute_name": "year",
        "condition": "IN",
        "condition_values": ["2015", "2016"],
        "action": "add",
        "action_values": ["year", 1]
    }
]
```

Set _year_ to 2015 on the lines where it is lower than 2015:

```json
[
    {
        "attribute_name": "year",
        "condition": "LT",
        "condition_value": "2015",
        "action": "default",
        "action_value": "2015"
    }
]
```

Set the _date_ attribute to today's date:

```json
[
    {
        "action": "default",
        "action_value": "$today",
        "attribute_name": "date"
    }
]
```

Convert a temperature from Kelvin to Celsius:

```json
[
    {
        "action": "sub",
        "action_values": [
            "temp_min",
            273.15
        ],
        "attribute_name": "temp_min"
    }
]
```

Normalise a timestamp:

```json
[
    {
        "action": "date_replace",
        "action_values": [
            "%a %b %d %H:%M:%S +0000 %Y",
            "%Y-%m-%d %H:%M:%S"
        ],
        "attribute_name": "statuses_created_at"
    }
]
```

:::

## Go further

If you need training or technical assistance to implement our solutions, contact your sales representative or click on [this link](https://www.ovhcloud.com/es-es/professional-services/) to get a quote and ask our Professional Services experts for a custom analysis of your project.

Ask questions, give your feedback and interact directly with the team building the Data Platform on the dedicated [Discord channel](https://discord.gg/ovhcloud).

If you need support with your OVHcloud services, create a request in our [Help Centre](https://help.ovhcloud.com/csm?id=csm_get_help).

Join our [community of users](https://community.ovhcloud.com/).
