Data Hub Configuration

Data Hub implements a hierarchy of configuration. Configuration properties specified at a higher level in the hierarchy overwrite properties specified at a lower level.

You can configure Data Hub using a combination of configuration files, environment properties, and command line JVM instructions. Data Hub itself ships with default properties files. Certain Data Hub modules may also contain their own specific configuration, in module properties. Both Data Hub defaults, and module configuration, can then be overwritten by custom, local configuration and extensions. The hierarchy is as follows:

The layers in blue relate to properties provided in the development of modules or extensions. The layers in yellow typically are where you provide properties for runtime environments. The green layer, the command line, is where you can set Java system properties, overriding properties set at a lower level for one time testing scenarios. You can provide configuration in Java *.properties files, *.conf or *.json files, and several other methods. The available methods for each level of configuration is provided in the following table:

File Name

File Extension

Description

default

.properties, .conf, .json

Define your own new configuration values with a default value.

module

.properties, .conf, .json

Overwrite existing default config with different values for your module.

module-extension

.properties, .conf, .json

Provide new property values for your extension, or overwrite default or module properties provided in Data Hub.

local

.properties, .conf, .json

Used in the final application deployment to overwrite defaults from modules and extensions. This file is where you put your runtime configuration.

local-test

.properties, .conf, .json

Used for testing only. Allows you to overwrite config values in tests. This file is useful for changing any property that speeds up testing or allows you to more easily create test cases.

$HYBRIS_ENV="<filename>-properties …"

No need to specify a file extension in the environment properties. But the target *-profilefile should be .properties, .conf, or .json

Used to inject environment-specific settings from a profile in the classpath. this method is useful in testing scenarios.

$JAVA_OPTS="config.resource=<filename> …" or "config.file=<filename> …" or "config.url=<filename> …"

s

No need to specify a file extension in JAVA_OPTS. But the target file for config.file should be .properties, .conf, or .json

JAVA_OPTS to specify a different source for configuration.

-D config.file=<filename> … and so on

The same as for $JAVA_OPTS, but provided on the command line at startup.

Properties such as Java system properties can be set with command line arguments. For example, you can use the -D option to inject passwords so they do not need to be stored in the file system.

Data Hub supports HOCON syntax in configuration files. HOCON is more readable, and provides the flexibility of include statements. Include statements allow you to divide large configuration files into smaller, digestible chunks, and to load configuration from any URI. For more information on HOCON support in Data Hub see, Configuration Using HOCON.