Search code examples
pentaho

Pentaho CDE nested sql query


We have set a nested SQL query on pentaho CDE . Query :

select dataissue.value,count(value) as nbreticket,substring(issue.entry,1,3) 
from DataIssue,issue where field = 'version(s)_corrigée(s)' 
and dataissue.issue = issue.id and issue in ( select issue
from dataissue,issue where dataissue.issue = issue.id and value = 'récit' 
and substring(issue.entry,1,3) = 'ema' ) and issue in ( select issue 
from dataissue,issue where dataissue.issue = issue.id and value = 'Fermée' 
and substring(issue.entry,1,3) = 'ema' ) and issue in ( select issue 
from dataissue,issue where dataissue.issue = issue.id 
and field = 'point_d_effort' and substring(issue.entry,1,3) = 'ema' ) 
group by dataissue.value

And we have set a bar chart component with that query .

But there is no result in the bar chart .

Does Pentaho cde support nested sql Query


Solution

  • Pentaho cde supported nested sql Query.

        SELECT SUBSTRING(issue.entry,1,3),dataissue.value,COUNT(VALUE) AS nbreticket
    FROM DataIssue,issue WHERE FIELD = 'version(s)_corrigée(s)' 
    AND dataissue.issue = issue.id AND issue IN ( SELECT issue
    FROM dataissue,issue WHERE dataissue.issue = issue.id AND VALUE = 'récit' 
    AND SUBSTRING(issue.entry,1,3) = 'ema' ) AND issue IN ( SELECT issue 
    FROM dataissue,issue WHERE dataissue.issue = issue.id AND VALUE = 'Fermée' 
    AND SUBSTRING(issue.entry,1,3) = 'ema' ) AND issue IN ( SELECT issue 
    FROM dataissue,issue WHERE dataissue.issue = issue.id 
    AND FIELD = 'point_d_effort' AND SUBSTRING(issue.entry,1,3) = 'ema' ) 
    GROUP BY dataissue.value
    

    you can put these sql and run and see.

    If there is no result in bar chart.

    => You can do one thing, Go to your dashboard location meaning where ever you save that dashboard that location.

    => In these location CDA file is there. Select that CDA file and click "open in new window". After one new window will appear and select that query and see that result is display or not.

    => If result is displayed there is no problem in that sql.

    Thank you..