Filter data by user on Pentaho CDE


  1. Create a dashboard on CDE
  2. Create a Simple Parameter for example param_user
  3. On Layout Perspective –> Add Code Snippet. We will use  Dashboards.context.user
    $( document ).ready(function() {
    var param_user=Dashboards.context.user;
    Dashboards.fireChange("param_user",param_user);
    });
    
  4. Now on datasources create a query with param_user as parameter
    SELECT * FROM
    tablename
    WHERE user=${param_user}
    
  5.  Use your query in a CDE component (Table, Chart, Text Component)
Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s