count distinct values in Oracle

Six Stars

count distinct values in Oracle

Hello,

To count distinct value i used the component tAggregateRow but the volume of my table(11 millions) is huge so it takes a lot of time to finish the job.

So I want to put the query

"select A, count (distinct A) from C

group by A" in talend. 

Any one could help me with this ?

Thanks 

ledoan

 


Accepted Solutions
Fifteen Stars TRF
Fifteen Stars

Re: count distinct values in Oracle

You can use tOracleInput component with the following query:

select A, count (distinct B) countB from C group by A

You must a Talend schema with 2 fields for the tOracleInput component:

- A, to get the value of A

- countB, to get the count of B for each A group


TRF

All Replies
Fifteen Stars TRF
Fifteen Stars

Re: count distinct values in Oracle

select count(*), A from C group by A

TRF
Highlighted
Six Stars

Re: count distinct values in Oracle

Sorry, it has the error in my query. 

My query is 

"Select A, count (distinct B) from C

group by A"

 

which component that i can execute my query in talend

 

Fifteen Stars TRF
Fifteen Stars

Re: count distinct values in Oracle

You can use tOracleInput component with the following query:

select A, count (distinct B) countB from C group by A

You must a Talend schema with 2 fields for the tOracleInput component:

- A, to get the value of A

- countB, to get the count of B for each A group


TRF

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Downloads and Trials

Test drive Talend's enterprise products.

Downloads