Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

For Executing Complex SELECT Statement with WHERE and GROUP BY Clause - Direct SQL or Talend is best

Dear Team,

 

I am quite new to talend and exploring it functionality.

 

Recently I came across a complex SQL Select statement something like this,

 

SELECT COLUMN1, CLOUMN2, CLOUMN3, COUNT(ID) AS EMP_COUNT, AVG(DATEDIFF(YEAR,DOB,GETDATE())) AS AVG_AGE 
FROM TABLE 1
WHERE DOJ <= GETDATE()
AND ISNULL(SEPARATIONDATE, DATE(ADD,D,1,GETDATE()) > GETDATE()
GROUP BY 
COLUMN1, CLOUMN2, CLOUMN3

When I am trying to replicate this select statement using talend components, tDBInput, tCombinedSQLFilter, tCombinedSQLAggregate, tCombinedSQLOutput, tDBCommit,tDBInput, tLogRow. (PFA Screen Shot for reference)

 

I feel its quite complicated than writing a SQL statement. So could you please suggest me best approach how we can do this kind of transformations using talend.

 

Thanks in advance.

 

Labels (2)
1 Solution

Accepted Solutions
manodwhb
Champion II
Champion II

@KathikVenky ,please accept the solution.

View solution in original post

3 Replies
manodwhb
Champion II
Champion II

@KathikVenky , You can directly use that query in tDBInput and o that the query burden will be on DB side and you can tune that query y adding hints.

Anonymous
Not applicable
Author

@manodwhb  Thank you mano.

manodwhb
Champion II
Champion II

@KathikVenky ,please accept the solution.