should-snapshot-data

The should-snapshot-data parameter is a Boolean that allows Liquibase to snapshot your database data. The default value is false.

Uses

You can use the should-snapshot-data parameter with the generate-changelog command. If you specify shouldSnapshotData=true, the generate-changelog command will include insert statements for the data in your database or <loadData> if the dataDir argument is set.

Note: The diff-changelog command does not compare data and therefore does not generate the data-related changesets, even if you have shouldSnapshotData=true.

Syntax

You can set this parameter in the following ways:

Option Syntax
Liquibase properties file
liquibase.shouldSnapshotData: <true|false>
Global flow file argument (example)
stages:
  Default:
    actions:
      - type: liquibase
        command: generate-changelog
        globalArgs: { should-snapshot-data: "<true|false>" }
Global CLI parameter
liquibase
 --should-snapshot-data=<true|false> generate-changelog
 --changelog-file=example-changelog.xml

JVM system property (JAVA_OPTS Environment Variable)

JAVA_OPTS=-Dliquibase.shouldSnapshotData=<true|false>
Liquibase Environment Variables
LIQUIBASE_SHOULD_SNAPSHOT_DATA=<true|false>

For more information, see Working with Command Parameters.