Specifying Complex Parameters

Some brick parameters are easy to specify (require a simple string or a choice of true/false) while the others may be represented by complex structures (array or JSON) and require special formatting and syntax requirements to be met before you can add such parameters to a brick schedule (see Schedule a Data Loading Process).

When you have to specify a complex parameter, follow these steps:

  1. Encode complex parameters.
  2. Add the result parameters to the brick schedule.

Contents:

Encode Complex Parameters

Within one schedule, parameters with complex structures (array or JSON, which may contain nested arrays or other JSON structures) must be combined and entered as a value of a special parameter, 'gd_encoded_params'.

If a complex parameter contains sensitive information (for example, passwords), encode it by introducing a new parameter and then add this new parameter to the brick schedule as a secure parameter (see Configure Schedule Parameters).

Example:
Imagine that you are scheduling a brick that has a few parameters that are described with JSON structures and arrays. You have to define the following:

  • The 'development_client' parameter

    "development_client": {
      "server": "https://your.domain.com",
      "username": "john.doe@yourdomain.com",
      "password": "secret"
    }
  • The 'production_tags' parameter

    "production_tags": ["complete", "draft"]

To encode these parameters, combine them into one JSON structure, like this:

{
  "development_client": {
    "server": "https://your.domain.com",
    "username": "john.doe@yourdomain.com",
    "password": "secret"
  },
  "production_tags": ["complete", "draft"]
}

Notice that we have sensitive information in this JSON structure: the password for 'development_client'. This password must be encoded separately so that it is not visible and does not appear in clear-text form in any GUI or log entries. Therefore, let's code the 'password' parameter by introducing a new parameter, 'development_client_password', which we are going to add to the brick schedule separately as a secure parameter.

{
  "development_client": {
    "server": "https://your.domain.com",
    "username": "john.doe@yourdomain.com",
    "password": "${development_client_password}"
  },
  "production_tags": ["complete", "draft"]
}

This JSON structure is becoming the value of the 'gd_encoded_params' parameter in the brick schedule.

Now, you are ready to enter the parameters to the brick schedule.

Add the Result Parameters to the Brick Schedule

At this point, you have the following:

  • The JSON structure that combine your complex parameters and represents the value of the 'gd_encoded_params' parameter
  • The 'development_client_password' parameter that encodes the 'password' parameter in 'development_client'

While JSON structures are usually formatted in a specific way, you can still use them as a parameter value in the dialog for scheduling bricks: simply copy the structure and paste it in the parameter value field.

You can now enter the parameters in the brick schedule:

  1. Enter the 'gd_encoded_params' parameter as a regular (not secure) schedule parameter.
  2. Enter the 'development_client_password' parameter as a secure schedule parameter.

You are now ready to finish the scheduling process.

Powered by Atlassian Confluence and Scroll Viewport.