August 15, 2023

Configuring the query of the customer records of interest – Docs for ESB 6.x

Configuring the query of the customer records of interest

  1. Double-click tMySQLInvalidRows to open
    its Component view.

    use_case-tmysqlinvalidrows-dq_rules3.png

  2. In the Validation type field, select
    DQ rule validation in order to use the
    given data quality rule.
  3. Select Use an existing connection to
    reuse the connection that tMysqlConnection
    creates.
  4. Click the […] button next to Edit schema to open the schema editor.

    use_case-tmysqlinvalidrows-dq_rules4.png

  5. Click the [+] button three times to add
    throw rows and rename them as Name,
    DOB and Email, respectively.
  6. In the DOB row, select VARCHAR in the DB
    type
    column, enter 19 in
    the Length column and 0 in the Precision column.
  7. Click OK to validate these changes and
    accept the propagation prompted by the pop-up dialog box.
  8. In the Table name field, enter or browse
    to the database table to be checked, cust
    in this example.
  9. In the Where clause field, type in the
    where clause to be used, in addition to the given data quality rule, to
    query the customer data of interest. In this scenario, enter
    cust.Email like 's%' within the quotation marks to
    retrieve the email records beginning with the letter s or S.
  10. In the DQ rule list field, select the
    data quality rule to be used. In this scenario, select cust_age. This rule is a demo rule reading

    18<=((TO_DAYS(NOW())-TO_DAYS(DOB))/365)

    You can check the available data quality rules in Libraries > Rules > SQL of the DQ
    Repository
    . The cust_age
    rule can be imported from the TDQEEDEMOJAVA project.

    use_case-tmysqlinvalidrows-dq_rules6.png

    For further information about the DQ
    Repository
    and its items and about how to import the data
    quality demo project, see the
    Talend Studio
    User Guide
  11. Click Guess Query to generate the
    corresponding query clause that uses the Not clause.
  12. In the Query field, change 18 to 20 to
    modify the clause as the following:

    This clause allows you to select the customers whose ages count 20 or more.

Document get from Talend https://help.talend.com
Thank you for watching.
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x