Using the Create-Drop Property

The datahub.autoInitMode="create-drop" property starts Data Hub and its extensions with a clean database. Use this property in a test and development environment only.

For a sample repository of configuration files you can use when testing, see the Data Hub Sample RepositoryInformation published on non-SAP site.

Add Create-Drop to the Data Hub Environment

The datahub.autoInitMode="create-drop" drops the Data Hub schema and rebuilds with a clean database on each restart.

Context

In a test or development environment, you may need to create or modify an extension for Data Hub, and deploy it with a clean database. You can then load your data into the database, verify the results, make adjustments, and start over if necessary. You can also use this configuration during a migration to SAP Commerce Cloud.

Procedure

  1. Add datahub.autoInitMode="create-drop" to your configuration file, datahub-environment.conf or datahub-environment-<environmentcode>.conf .
  2. Commit the change to your repository.
  3. Perform a build.
  4. Deploy that build to your test environment.

Results

Your Data Hub instance will have a clean database.

Remove Create-Drop from the Data Hub Environment

Before deploying Data Hub to a live customer environment, change the datahub.autoInitMode property to a safe value.

Context

If you have been using Data Hub in a test environment and have the datahub.autoInitMode set to create-drop, then ensure you set it back to either create or ignore prior to deploying it to a production environment.

Procedure

  1. To disable create-drop, edit the property in the configuration file as follows.
    datahub.autoInitMode="create"
  2. Commit the change to your repository.
  3. Perform a new build.
  4. Deploy the new build to their desired environment.