Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
DL001
Contributor
Contributor

What type of analysis is this?

Hi
I have a parent table that has unique rows and a count of the children, e.g.
+---+--------+
| ID | Count  |
+---+--------+
| 1  |        0 |
+---+--------+
| 2  |        3 |
+---+--------+

and the child table has n rows per parent:

+---+------------+--------+
| ID | Parent ID  |   Attr   |
+---+------------+--------+
| 1  |             2 |           |
+---+------------+--------+
| 2  |             2 |           |
+---+------------+--------+

I need to analyse the tables to check that the number of rows in the child table matches the count stated in the parent.
What does Talend DQ call this analysis?
Thanks
Labels (2)
2 Replies
Anonymous
Not applicable

Hi,
Are you looking for table analyses in Talend Data quality product?
https://help.talend.com/search/all?query=Table+analyses
Here is a DQ component TalendHelpCenter:tFuzzyMatch which compares a column from the main flow with a reference column from the lookup flow and outputs the main flow data displaying the distance.
Best regards
Sabrina
DL001
Contributor
Contributor
Author

xdshi wrote:
Hi,
Are you looking for table analyses in Talend Data quality product?
https://help.talend.com/search/all?query=Table+analyses
Here is a DQ component  TalendHelpCenter:tFuzzyMatch which c ompares a column from the main flow with a reference column from the lookup flow and outputs the main flow data displaying the distance.
Best regards
Sabrina

Yes, as stated originally, column analyses between tables.

It's not really a fuzzy match, thought, is it? I'm comparing the value in one table with a count in another. If I were writing this in SQL, it would be:

SELECT
  P.KeyColumn
, P.CountColumn
, CASE WHEN P.CountColumn = C1.RowCount
    THEN 'Y'
    ELSE 'N'
    END AS CountMatch
FROM ParentTable P
, (
  SELECT
      ParentKeyColumn
    , COUNT(1) AS RowCount
    FROM ChildTable
    GROUP BY
        ParentKeyColumn
  ) C1
WHERE P.KeyColumn = C1.ParentKeyColumn


Thanks