Unable to setup/restore Algorithms with spaces
Closed this issue · 4 comments
Delphix Masking Initializer v1.1.0
Getting the following error when attempting to assign an Algorithm Name (NULL SL
) that contains a space to columnMetadatas
. All other API calls work as expected up until this point. The command issued is as follows:
dlpx-masking-initializer -f ~/test_delphix_initializer.yml -s -r
09:46:38.940 [main] INFO com.delphix.masking.initializer.maskingApi.endpointCaller.ApiCallDriver - http://maskingengine:8282/masking/api/column-metadata?page_size=1000&&page_number=1&&table_metadata_id=31644 GET
09:46:39.004 [main] INFO com.delphix.masking.initializer.maskingApi.endpointCaller.ApiCallDriver - http://maskingengine:8282/masking/api/column-metadata/353462 PUT
09:46:39.053 [main] ERROR com.delphix.masking.initializer.maskingApi.SetupDriver - Got status code: [404] with message [Could not find Algorithm 'NULL SL'] trying to hit URL: [http://maskingengine:8282/masking/api/column-metadata/353462] [PUT]
source of test_delphix_initializer.yml
is as follows:
applications:
- applicationName: ENT
environments:
- environmentName: ent_N2D
purpose: MASK
isWorkflowEnabled: false
databaseConnectors:
- connectorName: ent
databaseType: ORACLE
host: <redacted>
port: 1521
sid: <redacted>
schemaName: <redacted>
username: <redacted>
password: <redacted>
databaseRulesets:
- rulesetName: ent_all
tableMetadatas:
- tableName: APPL_MODE
columnMetadatas:
- {columnName: AM_CD, algorithmName: NULL SL, domainName: NULL_SL}
I have tried variations on algorithmName
such as enclosing in double-quotes, single quotes, using %20, and breaking out the structure to be on separate lines all to no avail. When I pass in an algorithmName
with no spaces, it works as expected.
When running with -l DEBUG
after setting the algorithmName
to NULL SL
in the UI, the following is returned on the GET
for column-metadata
. Note that algorithmName
in line 5 is not set properly.
{
"columnMetadataId": 353462,
"columnName": "AM_CD",
"tableMetadataId": 31644,
"algorithmName": "NullValueLookup",
"domainName": "NULL_SL",
"dataType": "VARCHAR2",
"columnLength": 20,
"isMasked": true,
"isProfilerWritable": false,
"isPrimaryKey": true,
"isIndex": true,
"isForeignKey": false,
"notes": ""
}
Hey Doug,
So certain built in algorithms, like NULL SL
/NullValueLookup
actually have a different names in the UI vs the API. In the UI, you see NULL SL
and in the API you see NullValueLookup
, so everything is working as expected.
From your first post, simply replace algorithmName: NULL SL
with algorithmName: NullValueLookup
and you should be all set. The returned values from the GET
request is correct.