User Community Service Desk Downloads
If you can't find the product or version you're looking for, visit support.ataccama.com/downloads

Working with Constants

Constants function as global variables that can be used in any deployment and in any environment. There are two types of constants:

  • Changeable Constants: Users can create, edit, and delete changeable constants as necessary.

  • Fixed Constants: These constants are automatically generated based on the information provided for each deployment. For example, DPM-TEST_MODULE would correspond to the module name of a deployment named dpm that is used in a test environment. Fixed constants cannot be modified or deleted.

You can view available constants on the Constants overview screen.

working with constants constants overview

For each constant, you can see the following:

  • Name: The name of the constant, which is used to refer to the constant from a configuration property.

  • Value: The value of the constant.

  • State: There are two states, USED and DELETED. States are currently used only for visual distinction. Deleted constants can no longer be edited.

When defining a property, use this syntax to refer to a constant:

ataccama.one.property-name={{constantName}}

Constants cannot be used as part of a value. In other words, they can only be used to completely substitute the value, for example:

  • Correct: ataccama.one.test-url={{DEFAULT_MODULE_URL}}.

  • Incorrect: ataccama.one.test-url=localhost:{{DEFAULT_MODULE_PORT}}.

Add constants

To create a new constant, follow these steps:

  1. In the Configuration Service, go to the Constants tab.

  2. Select Create.

  3. Provide the following information:

    working with constants create new constant

    • Name: The name of the constant. Required.

    • Value: The constant value. You can specify the value later when editing the constant.

  4. Save the changes.

Edit constants

You can update the value of any changeable constant as needed. If you need to change the name of a constant, create a new constant instead.

  1. In the Configuration Service, go to the Constants tab.

  2. Select the constant that you want to edit.

  3. In the dialog that appears, specify the new value.

    working with constants edit constant

  4. Save the changes.

    Updating a constant sets the status of all deployments where the constant is referenced to DRAFT. Therefore, you need to redeploy the properties in all such deployments to make sure that they are using the latest version of the configuration.

    This applies to both changeable and fixed constants.

Delete constants

You can only remove changeable constants. The deleted constant can still be viewed in the Constants overview, but it can no longer be edited and its state is updated to DELETED.

  1. In the Configuration Service, go to the Constants tab.

  2. Find the constant that you want to delete and select more options.

  3. Select the Delete option.

  4. In the confirmation dialog that appears, click Delete to confirm your choice.

    The state of the constant has been updated to Deleted and it can no longer be used.

Was this page useful?