"[SOLVED] How to filter string"

CharlieFirpoCharlieFirpo MemberPosts:48Contributor II
edited June 2019 inHelp
Dear all!

I have a table with one column that has string values like string1string2string3.... I want filter out only the rows that contains specific string like string2.
Can you help me to solve this? The string1string2... can contain special characters like " , : ...
In SQL, I can use a query like this: SELECT * FROM WHERE LIKE '%%'

Thank you!!!
Tagged:

Answers

  • awchisholmawchisholm RapidMiner Certified Expert, MemberPosts:458Unicorn
    Hello

    One way is to generate a new attribute that is set to true or false depending on whether it matches. From there filter out the false values and for completeness remove the new attribute.

    Here's an example









    <操作符= " true " class = " generate_data_u激活ser_specification" compatibility="5.3.008" expanded="true" height="60" name="Generate Data by User Specification" width="90" x="45" y="75">





    <操作符= " true " class = " generate_data_u激活ser_specification" compatibility="5.3.008" expanded="true" height="60" name="Generate Data by User Specification (2)" width="90" x="45" y="165">





    <操作符= " true " class = " generate_data_u激活ser_specification" compatibility="5.3.008" expanded="true" height="60" name="Generate Data by User Specification (3)" width="90" x="45" y="255">
















    <参数键= " attribute_filter_type”value="subset"/>
















    Andrew
  • RWingerterRWingerter MemberPosts:38Contributor II
CharlieFirpo wrote:

In SQL, I can use a query like this: SELECT * FROM WHERE LIKE '%%'
Once you have set up a database connection (Tools > Manage Database Connections) you can use the "Read Database" operator and its query property to write an SQL query.

Roland

  • CharlieFirpoCharlieFirpo MemberPosts:48Contributor II
    Retegniw wrote:

    Once you have set up a database connection (Tools > Manage Database Connections) you can use the "Read Database" operator and its query property to write an SQL query.

    Roland
    Thank you very much! It's very simple and works well! (I was lost at FilterExamples and SelectAttributes and didn't find the solution here...)
  • RWingerterRWingerter MemberPosts:38Contributor II
    Glad to help.

    Roland
  • 登录orRegisterto comment.