Frage

I have a requirement where columns of the SQL will be generated based some selection, these columns are coming from Metric dimension but there is no metric ID present in Fact table. SQL would be something like below:

SELECT Location_Nbr, Day_Nbr, (Column_List- Coming from some other query)
FROM (Table_Name - Coming from same query which is providing Columns to be selected) 

I tried creating the SQL query but I get an error saying there is not a business relation between these tables. Is there any other way to achieve this?

War es hilfreich?

Lösung

To use Dynamic SQL in Pentaho Report Designer, you need to use

custom jdbc connection in data source

then in master report query name, select message format

type your dynamic query in message Pattern

select   
$(dynamic_data) as 'data' from table_name;
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top