alterDynamicTable alterTargetLag
Modifies the target lag for automatic refreshes. Target lag controls how fresh the data in the dynamic table should be.
Known limitations:
This change type does not support automatic rollback.
Snowflake snapshots created with Liquibase Secure 5.1 are incompatible with earlier versions due to enhanced object type detection for TABLES and VIEWS. Regenerate all snapshots with 5.1 after upgrading to avoid false differences in diff and diff-changelog operations.
Available attributes
Attribute | Type | Description | Required |
|---|---|---|---|
| String | Name of the catalog (database) containing the table | No |
| String | Name of the schema containing the table | No |
| String | Name of the dynamic table to alter | Yes |
| Boolean | Only execute if the table exists | No |
alterTargetLag nested attributes
Attribute | Type | Description | Required |
|---|---|---|---|
| String | New target lag (e.g., | Yes |
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:pro-snowflake="http://www.liquibase.org/xml/ns/pro-snowflake"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd
http://www.liquibase.org/xml/ns/pro-snowflake
http://www.liquibase.org/xml/ns/pro-snowflake/liquibase-pro-snowflake-latest.xsd">
<!-- Set time-based target lag -->
<changeSet id="set-target-lag" author="examples">
<pro-snowflake:alterDynamicTable tableName="REALTIME_SUMMARY">
<pro-snowflake:alterTargetLag newTargetLag="5 MINUTES"/>
</pro-snowflake:alterDynamicTable>
</changeSet>
<!-- Set DOWNSTREAM target lag -->
<changeSet id="set-downstream-lag" author="examples">
<pro-snowflake:alterDynamicTable tableName="DEPENDENT_SUMMARY">
<pro-snowflake:alterTargetLag newTargetLag="DOWNSTREAM"/>
</pro-snowflake:alterDynamicTable>
</changeSet>
</databaseChangeLog>