如何使用数据源中查询组件获得的结果var-在Pentaho cde上查询?

时间:2019-08-29 15:29:58

标签: pentaho pentaho-cde

我有一个由查询组件获取的变量,我想将其传递给将由另一个查询组件使用的数据源上的查询,这是我所做的:

1)数据源-sql_company_id:

enter image description here

2)第一个查询组件:

enter image description here

在Post Fetch上具有JS功能:

function f(company_id) { 
    dashboard.setParam('company_id', company_id.resultset); 
} 

所以在我的示例中为company_id = 1。

3)数据源-sql_company_name

enter image description here

其参数定义如下:

enter image description here

4)第二个查询组件:

enter image description here

具有这样的Post Fetch:

enter image description here

应该显示具有company_id ='1'的公司名称,但是什么也没有出现。

当我将第二个查询更改为:

select company_name
from company
where company_id=1;

然后它起作用。

我没有正确使用我想的变量{company_id}。 我有一个非常相似的概率,并得到了解决方案,所以这次我以相同的方式进行。我哪里错了?

0 个答案:

没有答案