Or you need to go out from GUI and go to API/CLI methods, and build simple Python/shell script which will run:
1. Run PRE masking operations, like dropping indexes, PKs, FKs, etc
2. Authenticate in Masking Engine
3. Execute Masking JOB or JOBs
4. Run POST masking operations like dropping indexes, PKs, FKs, or whether you want :)
Example of script:
### Configuration section
# Masking Engine IP address
ME_IP="10.10.105.11"
# Masking Engine user login
ME_USER="apijob_runner"
# Masking Engine user password
ME_PASS="[password]"
# JOB List
JOBLIST="55 36"
# Authentication
get_token()
{
AUTH_TOKEN=$(curl -s -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d "{ \"username\": \"$ME_USER\", \"password\": \"$ME_PASS\" }" http://${ME_IP}:8282/masking/api/login | cut -d ":" -f 2 |sed -E 's/["}]//g')
}
timestamp()
{
TS="$(date +'%Y-%m-%d %H:%M:%S')"
}
# In case of error of running Masking JOB
exit_error()
{
timestamp
echo ""
echo "$TS - Last JOB finish with error..."
exit
}
SQL_PRE_AS_USER()
{
timestamp
echo "$TS - PRE Script as USER"
sqlplus user/[password]@TNSALIAS @SQL_PRE.sql
timestamp
echo "$TS - End of executing PRE Scripts"
}
POST_script()
{
timestamp
echo "$TS - POST script"
sqlplus user/pass @POST_script.sql
timestamp
echo "$TS - POST script"
}
### Executive section
timestamp
echo "-----------------------------------------------"
echo "$TS - Masking JOBs start"
echo "-----------------------------------------------"
# Running PRE scripts
SQL_PRE_AS_USER
# Authorization
get_token
# Running masking JOBs using JOBLIST
for jobID in ${JOBLIST}
do
timestamp
echo "---------------------------------------"
echo "$TS - Start: job $jobID"
echo "---------------------------------------"
curl -X POST --header 'Content-Type: application/json' --header 'Accept: applicaion/json' --header "Authorization: $AUTH_TOKEN" -d "{\"jobId\": $jobID}" "http://${ME_IP}:8282/masking/api/executions"
# Waiting for Masking Engine
sleep 30
# JOB Status check
JOB_STATUS=`curl -s -X GET --header 'Accept: applcation/json' --header "Authorization: $AUTH_TOKEN" "http://${ME_IP}:8282/masking/api/executions" | sed -n "s/.*:${jobID},\"status\":\"\([A-Z]*)\".*/\1/p"`
echo "Job status: $JOB_STATUS"
echo "There are running JOBs, please wait..."
# Checking masking JOB status every ??? seconds
i=0
while [ "$JOB_STATUS" == "RUNNING" ]
do
sleep 15
let "i+=1"
# Refreshing auth token every 75 secs
let "m=$i % 5"
[ "$m" -eq 0 ] && echo "$(date +'%Y-%m-%d %H:%M:%S - keep alive')" && get_token
JOB_STATUS=`curl -s -X GET --header 'Accept: application/json' --header "Authorization: $AUTH_TOKEN" "http://${ME_IP}:8282/masking/api/executions" | sed -n "s/.*:${jobID},\"status\":\"\([A-Z]*\)".*/\1/p"`
done
timestamp
echo "------------------------------------------------------------------------------"
echo "$TS - End: job $jobID end with status $JOB_STATUS"
echo "------------------------------------------------------------------------------"
echo ""
# exit if job failed
[ "$JOB_STATUS" != "SUCCEEDED" ] && exit_error
done
# POST Scripts execution
POST_script
timestamp
echo "----------------------------------------------------------"
echo "$TS - End"
echo "----------------------------------------------------------"
Regards
Marcin