Skip to main content

Celonis Product Documentation

VARCHAR optimization

During a full extraction, Celonis checks the size of the actual contents in any VARCHAR column that is at least 256 characters wide and resizes the column as needed to fit the contents. This significantly improves performance since tables with oversized columns can lead to performance issues during transformation and data loads. For delta extractions, columns are automatically enlarged if necessary.

As a result, the column size can change depending on the content. If your transformation code relies on fixed column widths, you can set them at the beginning of your transformation phase such as:

ALTER table_name ALTER COLUMN colum_name SET DATA TYPE VARCHAR (size);

When creating new tables during the transformation phase, it is better to use a dynamic column length:

CREATE TABLE new_table AS
SELECT column1, column2 FROM table2;

rather than a static one:

CREATE TABLE new_table (
       column1 VARCHAR(size)
       column2 VARCHAR(size)
);
INSERT INTO new_table (column_name)
SELECT column1, column2 FROM table2;