Test Data Manager

  • 1.  Data Profiling- Classifier creation using regex

    Posted Jul 19, 2018 05:14 AM

    Hi,

     

    Iam trying to create the classifier for regex and seed list data.

    In below code, what value I should give for the parameter classifier orgin and classifier class for both regex and seedlist.

     

    {

      "name":"name",
      "description":"description",
      "classifierOrigin":"company name",
      "classifierClass":"com.ca.tdm.profiler.classifiers.RegExClassifier",
      "classifierType":"content",
      "tags":"tag name",
      "config":[
                {
                 "name":"name",
                 "value":"value"
                }
               ]
    }

     

    help me to solve the problem.

    Thanks in advace.



  • 2.  Re: Data Profiling- Classifier creation using regex

    Broadcom Employee
    Posted Jul 19, 2018 07:43 AM

    Hi,

     

    A classifier is either a regex or a seedlist classifier, it cannot be both. Below is the link to the manage data classifiers section in the documentation.

     

    Manage Data Classifiers - CA Test Data Manager - 4.5 - CA Technologies Documentation 

     

    Best regards,

    Peter



  • 3.  Re: Data Profiling- Classifier creation using regex

    Posted Jul 19, 2018 08:16 AM

    Hi Peter,

     

     

    Thanks for sending the document link.

     

    In referring to the document, I have created the below code for creating the classifier for phone number.

     

     

    {"name":"Phone Number", "description":"description","classifierOrigin":"CA Technologies", "classifierClass":"com.ca.tdm.profiler.classifiers.RegExClassifier", "classifierType":"Content", "tags":"Phone Number", "config":[ {

    "name":"Phone number", "value":"\s(?:\+?(\d{1,3}))?[-. (](\d)*(\d)[-. ]*(\d)(?: x(\d+))?\s$"

    }

    ]

    }

     

    but when I try to import into the CA TDM Portal. Iam getting the error "Supplied classifier definition file does not contain any valid content"

     

     

    Please check the above code and help me to solve the issue.

     

     

    --

     

    Thanks & Regards,

    Nilavarasi K

    SE-ASU TDM CoE

    +91 8870724843



  • 4.  Re: Data Profiling- Classifier creation using regex

    Broadcom Employee
    Posted Jul 19, 2018 08:29 AM

    Hi,

        I think the issue is with escape characters, can you try this:

     

    {"name":"Phone Number", "description":"description","classifierOrigin":"CA Technologies", "classifierClass":"com.ca.tdm.profiler.classifiers.RegExClassifier", "classifierType":"Content", "tags":"Phone Number", "config":[ {

    "name":"Phone number", "value":"\\s(?:\\+?(\\d{1,3}))?[-. (](\\d)*(\\d)[-. ]*(\\d)(?: x(\\d+))?\\s$"

    }

    ]

    }

     

    Regards

    Keith



  • 5.  Re: Data Profiling- Classifier creation using regex

    Posted Jul 19, 2018 08:38 AM

    Thanks for the reply.

     

    ?

     

    I tried with your edited code, got the same error.

     

     

    --

    Regards

    Nilavarasi K

    SE-ASU TDM CoE

    +91 8870724843



  • 6.  Re: Data Profiling- Classifier creation using regex

    Broadcom Employee
    Posted Jul 19, 2018 10:00 AM

    Hi,

     

    I tried importing your classifier in the format as specified by Keith and it is working.  Anything in the portal log which can be found in %programdata% ? 

     

    Best regards,

    Peter



  • 7.  Re: Data Profiling- Classifier creation using regex
    Best Answer

    Broadcom Employee
    Posted Jul 19, 2018 10:04 AM

    Hi,

     

        I was able to load the classification pack after adding the escape characters. Can you create a folder with just the .json file containing this classification rule, zip the folder and then drop the zip file onto the classification panel in the portal and let me know what error you see.

     

    Regards

    Keith



  • 8.  Re: Data Profiling- Classifier creation using regex

    Broadcom Employee
    Posted Jul 19, 2018 02:08 PM

    Hi Nilavarasi,

     

    If it gets to a point that Keith and Petr cannot assist, you will need to create a Support Case.  This will allow us to get more information.

     

    Cheers!
    Les