Skip to main content
Skip table of contents

STORAGE.SORTKEY_RECLUSTER_IN_ENTITY_RECREATE

Target database: Snowflake, Amazon Redshift

STORAGE.SORTKEY_RECLUSTER_IN_ENTITY_RECREATE option controls whether the clustering keys defined with SORT_KEY or INTERLEAVED_SORT_KEY are forced to recluster at deployment time when entity recreate will happen.


See also:


Usage

OPTION
STORAGE.SORTKEY_RECLUSTER_IN_ENTITY_RECREATE: Boolean

Default: true


Notes

STORAGE.SORTKEY_RECLUSTER_IN_ENTITY_RECREATE assumes that SORT_KEY or INTERLEAVED_SORT_KEY have been defined for the entity.


Examples

Snowflake: Order by sort key in entity recreate

Example case:

Property

Value

Target entity

publish.F_TRIP

SORT_KEY

trip_wid

Option set to true:

OPTION
STORAGE.SORTKEY_RECLUSTER_IN_ENTITY_RECREATE: true

If an entity change that will trigger entity recreation is deployed, Agile Data Engine will order the data by the cluster key when inserting data into the recreated entity:

SQL
...
CREATE TABLE publish.F_TRIP_1234_ALTER ...;

INSERT INTO publish.F_TRIP_1234_ALTER ...;
SELECT ...
FROM publish.F_TRIP ORDER BY (trip_wid);
...

Amazon Redshift: Vacuum sort only in entity recreate

Example case:

Property

Value

Target entity

publish.F_TRIP

SORT_KEY

trip_wid

Option set to true:

OPTION
STORAGE.SORTKEY_RECLUSTER_IN_ENTITY_RECREATE: true

If an entity change that will trigger entity recreation is deployed, Agile Data Engine will run vacuum sort only as a last step for the recreated entity:

SQL
...
VACUUM SORT ONLY publish.F_TRIP;

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.