runMaskingJob¶
This script will login and run a masking job. It depends on helpers in the helpers script as well as host and login information found in apiHostInfo and loginCredentials, respectively.
1 2 3 4 5 6 |
|
When deciding which masking job to run, we simply choose the first masking job found. You are encouraged to modify this to suit your needs. Please see get_masking_job_id in helpers for more information.
get_masking_job_id
echo "* running masking job '$MASKING_JOB_ID'..."
curl $SSL_CERT -X POST -H ''"$AUTH_HEADER"'' -H 'Content-Type: application/json' -H 'Accept: application/json' --data @- $MASKING_ENGINE/executions <<EOF
{
"jobId": "$MASKING_JOB_ID"
}
EOF
echo
If a masking job is called by a PowerShell hook script, the following command MUST be added to the script using the Powershell -File prefix, file path;, and the exit $LASTEXITCODE suffix.
PowerShell -File C:\Users\HomeFolder\AddUser.ps1; exit $LASTEXITCODE
If this is not added then Delphix will not know if the script ran or completed. For more information, please visit this SQL Server PowerShell Script Error Handling documentation.