Options

I am trying to perform null validation on a table

Pooja_AgrawalPooja_Agrawal Member Posts: 15 Maven
null validation has to performed on the table consisting of more than one column. Then storing it in two different tables in SQL Server such that records which pass the validation that is the records that are not null must get stored in one table and the records which fail the validation should get stored in separate table with proper error message.
Please help me to do this. I have used "Filter Examples Operator" and "Filter Examples with missing values Operator" but none of them are generating output as required. The null values are also coming.
Tagged:

Answers

  • Options
    BalazsBaranyBalazsBarany Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert Posts: 955 Unicorn
    Hi!

    Filter Examples is a good operator for separating data with and without missing values (that's how the statistics community calls null values).

    The easiest way to separate with Filter Examples is by selecting "no missing attributes" as the condition class parameter. You get the matches (rows without missing attribute values) on the "exa" output and the rows with missing values from the "unm" (unmatched) output. 

    So you could already store the two data sets into two different tables using Write Database. However, you need a "proper" error message. What makes an error message proper in your use case? Is "Has missing values" enough or do you need "Attribute X has a missing value"? Do you need it for just one attribute or all missing attribute values for each row?

    Loop Attributes and Generate Attributes would be helpful for the more detailed error message. For example, in Generate Attributes you would use the missing() function in an if() construct to generate the error message or append to the existing one.

    Regards,
    Balázs
  • Options
    Pooja_AgrawalPooja_Agrawal Member Posts: 15 Maven
    Hi Balazs,

    Thank you so much for your response. I really appreciate your efforts and time.

    By following your instructions I am still unable to get the desired output. Attaching screenshot for your better understanding on how my table looks 
    So here for a particular row where column values are null it should get stored in another table with the error message as "It has null values"
    Whereas all the records passing the validation must be stored in another table. these null values also should not come there.
     Please help me on this.

    Thanks,
    Pooja
     
  • Options
    BalazsBaranyBalazsBarany Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert Posts: 955 Unicorn
    Hi,

    I don't open random DOCX files from the web.

    What did you try? Please post the existing process XML or at least a screenshot. 

    If you followed my instructions (and read the documentation of the mentioned operators or looked at the Academy to learn how they work), you should have the desired output.

    Regards,

    Balázs
  • Options
    Pooja_AgrawalPooja_Agrawal Member Posts: 15 Maven
    can you please share me the XML? It would be so great of you!!
    As I have followed your approach only
Sign In or Register to comment.