Selasa, 09 Oktober 2018

Talend Tutorial : Oracle to CSV with Custom Query

In this section i have Oracle Table and i want to use a custom query using aggregate function and store the result in csv file.

The job :
In the TOracleInput component, i defined the Attribute as follows, and in the Query i use "Select Gender, count(GENDER) FROM CHILDSTAT GROUP BY GENDER". The result will be 2 column, GENDER and count(GENDER) so we have to define a built in schema that contains 2 column. the first one is GENDER with string type and second column for storing count(GENDER) is integer type.


After that we have to define the component for OutputDelimited, the filename, row separator, and field separator.


the result is like this, GENDER will contain M for male and F for Female and the next column is the total of Male and Female.

Tidak ada komentar:

Posting Komentar