Skip to content

System Configuration

Valentino Pinna edited this page Jun 21, 2024 · 25 revisions
  1. Configuration file behaviour
  2. Configuration file location
  3. Configuring logs
  4. Network settings
  5. Provider settings
  6. Other settings

Configuration file behaviour

The configuration of the java library has impacts on the behaviour of all the connectors and can be modified by means of the configuration.properties file.

The connector reads the configuration just once, when the java library is first loaded by the JVM.

Configuration file location

The connector looks for the configuration file in the current directory first and, if the file is not found, it tries to read the SDMX_CONF environment variable. If this variable is not set or the file is not found again, a default configuration is applied (default configuration should fit most environments, anyway).

Configuring logs

The tracing level is set, by default, to INFO and writes to stdout. To modify it you can change some of the following parameters:

SDMX.level = FINER
### Logging configuration
#handlers= java.util.logging.FileHandler
handlers= java.util.logging.ConsoleHandler
java.util.logging.ConsoleHandler.level = FINER
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter

You can modify the trace level, format and destination. Refer to the Java Util Logging documentation for details.

Network settings

If you have to use the connectors through a proxy, you can instruct the conncectors about it. If you have just a proxy in your environment, the http.proxy.default key should fit all your needs. However, if needed, you can also specify different provider URLs for different proxies, adding http.proxy.name0, http.proxy.name0.urls, http.proxy.name1, http.proxy.name1.urls, etc.

#### Network configuration
http.proxy.default = yourProxyHostDefault:yourProxyPortDefault
http.proxy.name0 = yourProxyHostname0:yourProxyPort0
http.proxy.name0.urls = sdw-wsrest.ecb.europa.eu,stats.oecd.org, ...

If your proxy needs authentication (we only support kerberos and basic type), you can specify it by the following entries:

KERBEROS

http.auth.preference = Kerberos
java.security.krb5.conf = yourKRB5ConfigurationFile
java.security.auth.login.config = yourJAASLoginConfigurationFile

BASIC

http.auth.preference = basic
http.auth.user = yourDomain\\yourUser (OPTIONAL)
http.auth.pw = yourPassword (OPTIONAL)

NOTE about basic authentication:
It is not advisable to leave the password in a plain text file. For this reason, if basic auth is configured, but user and password fields are not filled, the connector will interactively ask for proxy credentials at startup.

HTTPS and certificates

If a provider uses the HTTPS protocol, the Java Virtual Machine has to be instructed for using a keystore where the provider certificates have been loaded. In this case you can use the following configuration property:

javax.net.ssl.trustStore = full/path/to/your/KeyStore

If you want to temporarily disable certificate check (this is useful for testing purposes, but not advisable in general), you can do it using the following property:

ssl.disable.cert.check = false

Timeouts

By default all network timeouts (read and connect) are set to 0 (that means no timeout). If you want to override the timeouts for all connectors you can use the read.timeout and connect.timeout properties. E.g.:

# set 60 seconds
connect.timeout = 60000
read.timeout = 60000

Additional Providers

Additional providers can be configured by creating a providers.properties file. The following locations will be scanned in sequence for the file:

  • Any folder included in the Java classpath
  • The location defined by the Java system property "sdmx.providers.properties", if defined
  • The current working directory

Note that the Java classpath and the working directory are as defined in the Java Tutorial.

This is how the file should be structured:

id     creds  compr  version  description            endpoint
ECB  = false, true,  V2,      European Central Bank, https://data-api.ecb.europa.eu/service

where the fields are:

  • id: The id to assign to the provider, to be used in the API.
  • creds: a boolean indicating if the provider requires authentication
  • compr: a boolean indicating if the provider supports HTTP compression (generally true)
  • version: The SDMX REST API version supported by the provider: must be V2 for SDMX 2.1 and V3 for SDMX 3.0
  • description: A description of the provider, that will appear in the SDMX Helper menu. No commas!
  • endpoint: The endpoint for the provider, with invalid characters correctly URL escaped.

Other settings

Language

The default language of the connectors is English. This means that, if names and descriptions for the SDMX elements are found in multiple languages, they will be returned in english (if present). To change the preferred language you can use the sdmx.lang property to a valid locale. E.g.:

sdmx.lang = it,fr,en sets the preferred langages priority to italian, french and english

Metadata descriptions

By default the SDMX connectors show only the ids of the dimension and attribute codes. If needed, they can be configured to how the code descriptions too

  • default: only the code is displayed
    handle.sdmx.codes = code
  • only the description is displayed
    handle.sdmx.codes = description
  • codes and descriptions: code(description)
    handle.sdmx.codes = both

Excel specific properties

The default order for the observations is by increasing time. If you want to change it you can use the reverse.dump key:

reverse.dump = true

The results can be obtained as a table by setting the table.dump key:

table.dump = true