Rehearse (Rehearsal tool)

dxrt operation to rehearse (test) the metadata package deployment on to a target Salesforce Org.

Delphix recommends that users run the dxrt rehearse on the Salesforce tables to reduce the probability of errors during data-masking.

Access help

MacOSX or Linux

./dxrt salesforce rehearse --help

Windows

.\dxrt.exe salesforce rehearse --help

Syntax

MacOSX or Linux

./dxrt salesforce rehearse --parameter-name value

Windows

.\dxrt.exe salesforce rehearse --parameter-name value

Parameters

The parameters for the rehearsal operation are as follows.

Required parameters are marked with a *.

Parameter 

 Description

*-a, –-auth_type

Authentication mechanism used

[Options: OAUTH or USERPASS]

*-u, –username

Salesforce username for Authentication Type USERPASS

*-ci, –-client_id

Salesforce client id for Authentication Type OAUTH

*-ur, –-url

Url of the salesforce sandbox for Authentication Type OAUTH

-c, –component

Comma separted list of metadata package types to retrieve and deploy.

[default: trigger, workflow, process_builder, validation_rule, feed_history, field_history, duplicate_rule, picklist, global_picklist, unique, matching_rule, required, lookup_filter]

-i, –is_production

Specify flag is_production, if you are trying to connect to a production environment.

-o, –sf_objects

Comma separated Salesforce table names.
If running for the entire org, this parameter does not need to be passed.

-it, --is_interactive

This flag needs to be provided if the user intends to provide the password/secret keys in the interactive manner via prompt.

-e, --env_vars

Here, User needs to provide the list of environment variable names.

In case of authentication type being ‘USERPASS', user needs to pass Password & Security token here. These can be passed as ‘dxrt_password,dxrt_security_token’.

In case of authentication type being ‘OAUTH’, user needs to pass client_secret, access_token, refresh_token. These can be passed as 'dxrt_client_secret,dxrt_refresh_token,dxrt_access_token’.

Please note that the name of the environment variables provided above are only for reference. User can provide different names as well. However the sequence in which the variables are provided should be kept same as above.

There are two ways in which password/secret tokens can be provided to the rehearse command:-

  1. Using interactive mode:

The user is prompted to submit credentials for both OAUTH and USERPASS when they execute the rehearse command. By using the "-it" option with the dxrt command, the user can access this mode. With this: The rehearsal command prompts the user to input their login information for both OAUTH and USERPASS:

a) Entering password and security token for Authentication type USERPASS.

b) Entering client secret, access token and refresh token for Authentication Type OAUTH

Prompted Parameters

Description

Password:

Prompt for Salesforce user’s password for auth_type=USERPASS

After the user enters the password, there will be a confirmation prompt to enter the same password as before.

Security Token:

Prompt for Salesforce user’s security token for auth_type=USERPASS

Client Secret:

Prompt for Salesforce client secret for auth_type=OAUTH

Access Token:

Prompt for Salesforce access token for auth_type=OAUTH

Refresh Token:

Prompt for Salesforce refresh token for auth_type=OAUTH

  1. Using Environment Variables:

When using this option, the user must provide the required password/security tokens using the -e option in dxrt's disable command. The user can choose any name for saving the value of these parameters. However, the sequence in which these parameters must be passed cannot be changed. The following is how the user can pass these values in the disable command:

a) -e dxrt_password,dxrt_security_token for authentication type USERPASS

b) -e dxrt_client_secret, dxrt_refresh_token, dxrt_access_token for authentication type OAUTH

Please note that the names of the environment variables listed above are only for reference and can be changed; however, the sequence of the variables cannot be changed.

Setting up environment variables for dxrt:

Please see here for instructions on how to set environment variables for the various platforms supported by dxrt.

Sample Rehearse command using Username and Authentication mechanism USERPASS

Using interactive mode (-it):

The rehearse command prompts the user to enter password and security token.

MacOSX or Linux

./dxrt salesforce rehearse -u <username@abc.com> -a USERPASS -o "Account,Contact" -it

Windows

.\dxrt.exe salesforce rehearse -u <username@abc.com> -a USERPASS -o "Account,Contact" -it

Using environment variables (-e):

MacOSX or Linux

./dxrt salesforce rehearse -u <username@abc.com> -a USERPASS -o "Account,Contact" -e 'dxrt_password,dxrt_security_token'

Windows

.\dxrt.exe salesforce rehearse -u <username@abc.com> -a USERPASS -o "Account,Contact" -e 'dxrt_password,dxrt_security_token'

Note: The user is not required to provide the same environment variable names as shown in the above example. However, the sequence of variables cannot be changed.

Sample rehearse command using Authentication mechanism OAUTH

Using interactive mode(-it):

The rehearse command prompts the user to enter client secret, access token and refresh token.

MacOSX or Linux

./dxrt salesforce rehearse -ci <client_id> -ur <url> -a OAUTH -it

Windows

.\dxrt.exe salesforce rehearse -ci <client_id> -ur <url> -a OAUTH -it

Using environment variables(-e):

MacOSX or Linux

./dxrt salesforce rehearse -ci <client_id> -ur <url> -a OAUTH -e 'dxrt_client_secret,dxrt_refresh_token,dxrt_access_token'

Windows

.\dxrt.exe salesforce rehearse -ci <client_id> -ur <url> -a OAUTH -e 'dxrt_client_secret,dxrt_refresh_token,dxrt_access_token'

Note: The user is not required to provide the same environment variable names as shown in the above example. However, the sequence of variables cannot be changed.