Delphix Products

 View Only
  • 1.  Reverse Lookup REST API for Masking Algorithm

    Posted 05-03-2023 03:44:00 AM

    I have extracted a columnMetadataId for an algorithm assignment in my Inventory using the REST API
    url = fhttp://{dxMaskingEngineAddress}/masking/api/v5.1.14/algorithms/{algorithm}/usage?includeAssignmentDetail=false

    columnMEtadataID is part of the payload returned for this API

    What I am looking for is a reverse lookup , such that if I know only my columnMetadataID I can get back the Ruleset Name, Table Name and Column Name in the Delphix Engine Inventory that relates to that columnMetadataID

    Is there a REST API that will do this reverse lookup ?

    I want to be able to identify the Ruleset Name, Table Name and Column Name associated with the columnMetadataID so I can use the Delphix GUI to examine the entry in the Inventory



    ------------------------------
    Jim Thompson
    Senior Data Engineer
    FWD View Limited
    ------------------------------


  • 2.  RE: Reverse Lookup REST API for Masking Algorithm
    Best Answer

    Posted 05-04-2023 01:23:00 AM

    In version 10 you have more options on /algorithms/usage:
    includeAssignmentDetail = true
    Then you get the "assignementDetails" array:

    {
      "algorithmName": "dlpx-core:CM Alpha-Numeric",
      "algorithmMaskingType": "STRING",
      "columnMetadataIds": [
        1694
      ],
      "fileFieldMetadataIds": [],
      "mainframeDatasetFieldMetadataIds": [],
      "environmentIds": [
        5
      ],
      "rulesetIds": [
        10
      ],
      "domainNames": [
        "CERTIFICATE_NO",
        "PASSWORD",
        "PO_BOX",
        "PRECINCT",
        "RECORD_NO",
        "US_PASSPORT"
      ],
      "algorithmReferences": [
        "ADDRESS_GERMAN",
        "ZERO_CM"
      ],
      "assignmentDetails": [
        {
          "assignmentType": "DATABASE_COLUMN",
          "environmentName": "MSSQL",
          "databaseRulesetName": "ALL",
          "databaseTableName": "CANADA_SIN",
          "databaseColumnName": "SIN_MSK"
        }
      ]
    }

    OTHERWISE on older versions:

    /columnMetadata{id}

    {
      "columnMetadataId": 1694,
      "columnName": "SIN_MSK",
      "tableMetadataId": 215,
      "algorithmName": "dlpx-core:CM Alpha-Numeric",
      "domainName": "US_PASSPORT",
      "dataType": "nvarchar",
      "columnLength": 9,
      "isMasked": true,
      "isProfilerWritable": true,
      "isPrimaryKey": false,
      "isIdentity": false,
      "isIndex": false,
      "isForeignKey": false,
      "domainAssignedBy": "delphix-discovery"
    }

    Then the table from:
    /table-metadata{id}

     "tableMetadataId": 215,
      "tableName": "CANADA_SIN",
      "rulesetId": 10
    }

    From there the ruleset via /databaseRuleset{id} ...



    ------------------------------
    Tino Pironti
    Masking SME
    Technical Manager
    Delphix
    ------------------------------



  • 3.  RE: Reverse Lookup REST API for Masking Algorithm

    Posted 05-05-2023 04:13:00 AM

    Thanks Tino, I will give that a try on my v6 Engine.

    I am basically looking a means to highlight where I have a particular algo assigned in my Inventory i.e. a list of all the assignments. I will investigate a REST API solution.

    I am also guessing there is no search capability through the GUI ?

    thanks
    Jim



    ------------------------------
    Jim Thompson
    Senior Data Engineer
    FWD View Limited
    ------------------------------



  • 4.  RE: Reverse Lookup REST API for Masking Algorithm

    Posted 05-08-2023 09:47:00 AM

    Hi Tim, 

    Have you checked out the Delphix Masking Toolkit?  https://github.com/delphix/dxm-toolkit/tree/master  I haven't used this in a while, but it may work for what you're trying to do.  Command would be something like "dxmc column list".  There are other options to specify which engine to use, etc.  

    I used it for a bit, but found it to have some quirks and didn't quite work for what we wanted it to do.  I ended up writing a Python package to interact with the API.  It returns the results as objects and handles caching by metadata id.  Also helpful, I built in "parent" properties so I can do things like "column.parent.name" to get the table name. 

    Whatever your language of choice is, you'll want to create some generic functions to generalize the operations that are the same across endpoints.  Then you can really start digging for the data you're looking for.  

    Kevin



    ------------------------------
    Kevin Bott
    Sr. Database Architect
    Northwestern Mutual Life Insurance Company
    ------------------------------