Tautoincrement¶
flowtask.components.tAutoincrement
¶
tAutoincrement
¶
Bases: DBSupport, FlowComponent
tAutoincrement
Overview
The tAutoincrement component is designed to automatically increment values in a specific column of a dataset.
This is particularly useful when you need to fill in missing (null) values in a column with unique, sequential
integers starting from the maximum value currently present in the column.
Properties
.. table:: Properties :widths: auto
+------------------+----------+-----------+--------------------------------------------------------------------------------------+ | Name | Required | Type | Description | +------------------+----------+-----------+--------------------------------------------------------------------------------------+ | datasource | Yes | str | The datasource name (e.g., schema name) where the dataset is located. | +------------------+----------+-----------+--------------------------------------------------------------------------------------+ | dataset | Yes | str | The name of the dataset (e.g., table name) to work on. | +------------------+----------+-----------+--------------------------------------------------------------------------------------+ | column | Yes | str | The name of the column in which values will be auto-incremented. | +------------------+----------+-----------+--------------------------------------------------------------------------------------+
Return
Returns the dataframe with the given column and its auto-incremented sequence.
Example:
```yaml
tAutoincrement:
skipError: skip
datasource: pokemon
dataset: districts
column: district_id
description: Auto-increment district_id for new districts
```