<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4527276399966185267</id><updated>2012-01-27T03:14:49.774-08:00</updated><category term='Metedata editor'/><category term='&quot;Schema Workbench&quot;'/><category term='Pentaho Metadata Editor Tutorial'/><category term='Metadata'/><category term='&quot;Pentaho Report Designer&quot;'/><category term='Loop'/><category term='&quot;Pentaho Book&quot;'/><category term='&quot;Pentaho Kettle&quot;'/><category term='Google Visualization API'/><category term='&quot;Pentaho Report Designer MDX MQL JDBC Parameters How To&quot;'/><category term='Mondrian'/><category term='&quot;Pentaho Report Designer MQL Parameters&quot;'/><category term='Google Charts'/><category term='Pentaho Data Integration 4 Cookbook'/><category term='&quot;Pentaho Reporting Book&quot;'/><category term='Tutorial'/><category term='Pentaho'/><category term='&quot;Pentaho Reporting 3.5 for Java Developers&quot;'/><category term='Xactions'/><category term='&quot;Pentaho Report Designer MDX Parameters&quot;'/><category term='&quot;Pentaho Report Designer Parmaters&quot;'/><title type='text'>Diethard Steiner on Business Intelligence</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://diethardsteiner.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4527276399966185267/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://diethardsteiner.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Diethard Steiner</name><uri>https://profiles.google.com/101564429460248850938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>56</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4527276399966185267.post-8344033911605811647</id><published>2012-01-21T09:52:00.001-08:00</published><updated>2012-01-26T11:49:48.282-08:00</updated><title type='text'>Comparison of resource sharing features in open source reporting</title><content type='html'>&lt;h2&gt;Comparison of resource sharing features in open source reporting tools&lt;/h2&gt;In large scale reporting projects sharing resources is key for efficiency. This article tries to compare the three most popular open source tools to understand to which extend their feature set supports the various resource files that are likely to be shared.&lt;br&gt;&lt;br&gt;As an example: Maintain style definitions in a centralized global file. Instead of having to change a particular style in all the reports, this can simple be done in one global file. The clear advantages are: (1) It saves a lot of time and (2) consistency: every style is defined the same way for all reports and it is not as error prone as changing the style in every report.&lt;br&gt;&lt;br&gt;Apart from styles there are several other report properties which can be maintained in global external files to achieve a similar effect.&lt;br&gt;&lt;div style="background-color:transparent"&gt;&lt;div id="bv3q" style="text-align:left"&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;div id="xe-5" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_289gc2h8cc2_b" style="height:315px;width:617px"&gt;&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4527276399966185267-8344033911605811647?l=diethardsteiner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://diethardsteiner.blogspot.com/feeds/8344033911605811647/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://diethardsteiner.blogspot.com/2012/01/copy-of-pentaho-data-integration-remote.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4527276399966185267/posts/default/8344033911605811647'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4527276399966185267/posts/default/8344033911605811647'/><link rel='alternate' type='text/html' href='http://diethardsteiner.blogspot.com/2012/01/copy-of-pentaho-data-integration-remote.html' title='Comparison of resource sharing features in open source reporting'/><author><name>Diethard Steiner</name><uri>https://profiles.google.com/101564429460248850938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4527276399966185267.post-2355466550752741927</id><published>2012-01-08T02:55:00.000-08:00</published><updated>2012-01-08T02:55:15.877-08:00</updated><title type='text'>Book review: Agile Analytics: A Value-Driven Approach to Business Intelligence and Data Warehousing: Delivering the Promise of Business Intelligence</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://theagilist.com/wp-content/uploads/2011/07/bookcoversm1.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://theagilist.com/wp-content/uploads/2011/07/bookcoversm1.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;A high percentage of classic waterfall model business intelligence projects are failing. One of the main reasons for this is that the waterfall model is a sequential model: Simply speaking, you plan first, then develop, then test etc and then the whole project is supposed to be finished. BI project normally span several months. During this time, requirements change, the priority of the requirements might change, the understanding of the client in regards to what BI actually is changes, etc. A classic waterfall model cannot &amp;nbsp;accomodate these changing requirements easily over time as planing was done in the first step only.&lt;br /&gt;With "&lt;b&gt;Agile Analytics: A Value-Driven Approach to Business Intelligence and Data Warehousing&lt;/b&gt;: Delivering the Promise of Business Intelligence" &lt;a href="http://theagilist.com/"&gt;Ken Collier&lt;/a&gt; introduces agile methodology to BI projects. &amp;nbsp;Readers new to the agile methodology will find a detailed introduction (i.e. What are user stories? How do I conduct an agile project?), learn about the iterative cycles (sprints) which allow feedback driven development, various other approaches like test driven development, continuous integration and much more. Ken Collier also introduces the &lt;b&gt;Message Driven Warehouse &lt;/b&gt;which among other benefits allows to easily and quickly implement new requirements.&lt;br /&gt;In a nutshell, it is one of the best books on BI which I read last year, so I can only highly recommend it.&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4527276399966185267-2355466550752741927?l=diethardsteiner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://diethardsteiner.blogspot.com/feeds/2355466550752741927/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://diethardsteiner.blogspot.com/2012/01/book-review-agile-analytics-value.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4527276399966185267/posts/default/2355466550752741927'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4527276399966185267/posts/default/2355466550752741927'/><link rel='alternate' type='text/html' href='http://diethardsteiner.blogspot.com/2012/01/book-review-agile-analytics-value.html' title='Book review: Agile Analytics: A Value-Driven Approach to Business Intelligence and Data Warehousing: Delivering the Promise of Business Intelligence'/><author><name>Diethard Steiner</name><uri>https://profiles.google.com/101564429460248850938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4527276399966185267.post-654988953453963815</id><published>2011-11-27T08:01:00.001-08:00</published><updated>2011-11-27T08:11:31.331-08:00</updated><title type='text'></title><content type='html'>&lt;span class="Apple-style-span" style="font-size: large;"&gt;Jasperwave - the other JasperReports Designer&lt;/span&gt;&lt;br /&gt;It's always good when there is new competition on the field: Jasperwave is a recent project on creating a very user-friendly JasperReport Designer. Currently it is at version 0.9.2 and available both as Eclipse plug-in as well as standalone client from &lt;a href="http://jasperwave.com/"&gt;here&lt;/a&gt;.&lt;br /&gt;I have to say that for such an early version it is already a very impressive offering. All the basic functionality is covered, sub-reports are partially implemented and support for tables and crosstabs is coming with the next release.&lt;br /&gt;Overall, this report designer shows huge potential and I am looking forward to the next release! In the meantime, check out the current version &lt;a href="http://jasperwave.com/"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-zSJHJysOI_M/TtJgwdGyQiI/AAAAAAAAFCo/uJaIQekvQm0/s1600/Screen+Shot+2011-11-27+at+16.08.36.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="315" src="http://3.bp.blogspot.com/-zSJHJysOI_M/TtJgwdGyQiI/AAAAAAAAFCo/uJaIQekvQm0/s640/Screen+Shot+2011-11-27+at+16.08.36.jpeg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4527276399966185267-654988953453963815?l=diethardsteiner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://diethardsteiner.blogspot.com/feeds/654988953453963815/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://diethardsteiner.blogspot.com/2011/11/jasperwave-other-jasperreports-designer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4527276399966185267/posts/default/654988953453963815'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4527276399966185267/posts/default/654988953453963815'/><link rel='alternate' type='text/html' href='http://diethardsteiner.blogspot.com/2011/11/jasperwave-other-jasperreports-designer.html' title=''/><author><name>Diethard Steiner</name><uri>https://profiles.google.com/101564429460248850938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-zSJHJysOI_M/TtJgwdGyQiI/AAAAAAAAFCo/uJaIQekvQm0/s72-c/Screen+Shot+2011-11-27+at+16.08.36.jpeg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4527276399966185267.post-4323141554433918982</id><published>2011-11-19T11:06:00.001-08:00</published><updated>2011-11-19T11:14:16.922-08:00</updated><title type='text'>Jaspersoft iReport: How to pass a parameter to a sub-dataset</title><content type='html'>&lt;br /&gt;&lt;div style="background-color: transparent;"&gt;&lt;h2 dir="ltr" id="internal-source-marker_0.1118185636587441"&gt;&lt;span style="background-color: transparent; font-family: Arial; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Jaspersoft iReport: How to pass a parameter to a sub-dataset&lt;/span&gt;&lt;/h2&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 15px; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Let’s say our main report is grouped by continent and the details band holds sales figures for each country. We would like to add now a pie chart to the group footer to visualize the share by product by continent.&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: transparent;"&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 15px; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt; &lt;/span&gt;&lt;img height="224px;" src="https://lh4.googleusercontent.com/YDjYJbZBTLV6fhbiLKu7vyO40LnTvcUCbJ6y3850Cw_Wswt9QTkzT0BhtWq8qSqvdxeWluU7H7CtUzigmCdITXTclCn-pt8DheW-bbfwq3AxhQFKNgE" width="579px;" /&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 15px; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 15px; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Imagine our main report &lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 15px; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;query&lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 15px; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt; is:&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: transparent;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; white-space: pre-wrap;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 12px; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;SELECT&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 12px; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;product_sales.`continent` AS product_sales_continent,&lt;/span&gt;&lt;br /&gt;&lt;div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;"&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 12px; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;product_sales.`city` AS product_sales_city, &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 12px; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;product_sales.`product` AS product_sales_product,&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 12px; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;product_sales.`sales` AS product_sales_sales&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 12px; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;FROM&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 12px; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;`product_sales` product_sales&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 12px; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;ORDER BY&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 12px; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;1, 2, 3&lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 15px; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 15px; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 15px; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;To add a sub-dataset right click on the report root element and choose &lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 15px; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;New Dataset&lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 15px; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;:&lt;/span&gt;&lt;img height="287px;" src="https://lh3.googleusercontent.com/OMwCreDL9t6ISRVTKtpSqAjKk0HHUNmMLSWmO194BpRLfL4-4mF07ZA5T4j-FenJEXEkdjN6QGvRI77Pd7wGJQiHdKMbq5T1C5tY6l8o2P4m1sRHAe0" width="352px;" /&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 15px; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Follow the wizard instructions and insert a query. In our imaginary case it is something like this:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="background-color: transparent; font-family: Arial;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; white-space: pre-wrap;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 12px; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;SELECT&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 12px; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;product_sales.`product` AS product_sales_product,&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 12px; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SUM(product_sales.`sales`) AS product_sales_sales&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 12px; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;FROM&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 12px; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;`product_sales` product_sales&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 12px; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;GROUP BY 1&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 12px; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;ORDER BY 1&lt;/span&gt;&lt;span style="background-color: transparent; background-color: transparent; font-family: Arial; font-size: 15px; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; background-color: transparent; font-family: Arial; font-size: 15px; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;span style="background-color: transparent; background-color: transparent; font-family: Arial; font-size: 15px; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 15px; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;You must have noticed that there is something missing: This is of course not our final query, we want to &lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 15px; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;restrict the results by continent&lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 15px; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;. In order to do that, we have to first pass the parameter to the &lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 15px; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;sub-dataset&lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 15px; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; background-color: transparent; font-family: Arial; font-size: 15px; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 15px; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Now let’s have a look at how this is done:&lt;/span&gt;&lt;span style="background-color: transparent; background-color: transparent; font-family: Arial; font-size: 15px; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;ol style="background-color: transparent;"&gt;&lt;li style="background-color: transparent; font-family: Arial; font-size: 15px; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="background-color: transparent; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Create the &lt;b&gt;parameter&lt;/b&gt; within the sub-dataset:&lt;/span&gt;&lt;img height="129px;" src="https://lh4.googleusercontent.com/JnXkbDXRfdpGNJKWShKBB_DE7GlwhrkKhFVvQzkGYJHJRE0Bmfd0iDgy52f6YqAMdRrMQZCwiAn_iyGBGX0KazU2X4tk1YtkB-gA_xG1q2sK14VS1Kg" width="325px;" /&gt;&lt;span style="background-color: transparent; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;b&gt; &lt;/b&gt;&lt;b&gt;&lt;span id="internal-source-marker_0.1118185636587441" style="background-color: transparent; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Give it a name in the properties panel and make sure that the parameter class is the same as for the parameter that you want to pass from the main query. Also, untick&lt;/span&gt;&lt;span style="background-color: transparent; text-decoration: none; vertical-align: baseline;"&gt; &lt;/span&gt;Use as a prompt&lt;/b&gt;&lt;/span&gt;&lt;span style="background-color: transparent; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;:&lt;/span&gt;&lt;img height="102px;" src="https://lh5.googleusercontent.com/pQDl3Fky8P8HKzUpc5aSxXRdvJnMjUnrKYPhI_2eHy3PIOC1jJhkdUG215HVuT22ifzcvMH11LM58xyOpRqFWgdR2nrC2QYPj13KpdmIO2C23pQdue8" width="419px;" /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li style="background-color: transparent; font-family: Arial; font-size: 15px; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="background-color: transparent; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Now add a &lt;/span&gt;&lt;span style="background-color: transparent; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;chart&lt;/span&gt;&lt;span style="background-color: transparent; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt; to the design area.&lt;/span&gt;&lt;span style="background-color: transparent; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt; Right click&lt;/span&gt;&lt;span style="background-color: transparent; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt; on it and choose &lt;/span&gt;&lt;span style="background-color: transparent; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Chart Data&lt;/span&gt;&lt;span style="background-color: transparent; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;:&lt;/span&gt;&lt;img height="123px;" src="https://lh5.googleusercontent.com/ZddV-AkmXti1NeQrzBet9Qqwz6ihNuhZVNtwyOM54ezwvziMDC-vhDMt75cfvoIbeE0kiST3K5WpiynVjNZtrRtwsXdBISrg91N6FbbO2-SdEGA3WM8" width="432px;" /&gt;&lt;/li&gt;&lt;li style="background-color: transparent; font-family: Arial; font-size: 15px; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="background-color: transparent; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Specify all the standard settings for the chart (Connection etc), then click on &lt;/span&gt;&lt;span style="background-color: transparent; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Parameters&lt;/span&gt;&lt;span style="background-color: transparent; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt; and &lt;/span&gt;&lt;span style="background-color: transparent; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Add&lt;/span&gt;&lt;span style="background-color: transparent; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;. From the top pull down menu &lt;/span&gt;&lt;span style="background-color: transparent; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Dataset parameter name &lt;/span&gt;&lt;span style="background-color: transparent; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;choose the sub-dataset parameter we just created before. Click on the button next to &lt;/span&gt;&lt;span style="background-color: transparent; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Value expression&lt;/span&gt;&lt;span style="background-color: transparent; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;: You can now choose from the parameters, fields and variables of the &lt;/span&gt;&lt;span style="background-color: transparent; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;main dataset&lt;/span&gt;&lt;span style="background-color: transparent; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;. In our case, we just choose the continent field:&lt;br class="kix-line-break" /&gt; &lt;/span&gt;&lt;img height="614px;" src="https://lh4.googleusercontent.com/dovnWaeIfUWGS_7hZjyjvt1sfqe6wGy3goDNY-X_cg2kPi1PG3qek1O-slUKHng31KndeBCBNOR-8_Tzdb7O3mv4wxPTHXZcRzxqrWm_BE6pybdlnuc" width="549px;" /&gt;&lt;span style="background-color: transparent; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Apply, Click Apply, OK, &lt;/span&gt;&lt;span style="background-color: transparent; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;and &lt;/span&gt;&lt;span style="background-color: transparent; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Close&lt;/span&gt;&lt;span style="background-color: transparent; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;.&lt;/span&gt;&lt;/li&gt;&lt;li style="background-color: transparent; font-family: Arial; font-size: 15px; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="background-color: transparent; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Now we can finally change our SQL query in a way that it looks like we originally intended it to be. Therefore, &lt;/span&gt;&lt;span style="background-color: transparent; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;right click&lt;/span&gt;&lt;span style="background-color: transparent; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt; on the dataset and choose &lt;/span&gt;&lt;span style="background-color: transparent; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Edit Query&lt;/span&gt;&lt;span style="background-color: transparent; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;:&lt;/span&gt;&lt;img height="102px;" src="https://lh4.googleusercontent.com/dvthjkx1c_CKTqcDtW7MzsIO4TGubxTRjX3C-_oEmUTcd0FEnzTAYHwmgflA4aQeo1rR2NYISGTdB9lPwztIr5th1Hpf0FryzhLNbMjBQCAFe99aG_g" width="236px;" /&gt;&lt;br /&gt;&lt;span style="background-color: transparent; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;Now add a &lt;/span&gt;WHERE clause&lt;/b&gt;&lt;/span&gt;&lt;span style="background-color: transparent; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt; to the query like this one:&lt;/span&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 12px; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;WHERE&lt;br class="kix-line-break" /&gt;product_sales.`continent`=&lt;/span&gt;&lt;span style="background-color: transparent; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;br class="kix-line-break" /&gt;From the right hand side, you can &lt;/span&gt;&lt;span style="background-color: transparent; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;drag over the parameter&lt;/span&gt;&lt;span style="background-color: transparent; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;. It should then look like this:&lt;/span&gt;&lt;img height="159px;" src="https://lh6.googleusercontent.com/Y3eWV1axrE38IV5lJXFXMiHeNPeu_J-zMN_ZdFRVINy4BgV_HkPlCou0X0aBqQv_CO_63gQdpUUOVZ5rywKp1DZNFKVAYx46TNZQZdDIHEuJidqSPuQ" width="570px;" /&gt;&lt;span style="background-color: transparent; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;OK&lt;/span&gt;&lt;span style="background-color: transparent; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;.&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;span style="background-color: transparent; background-color: transparent; font-family: Arial; font-size: 15px; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 15px; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;For your reference, please find the whole last SQL query below:&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 12px; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;SELECT&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 12px; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;product_sales.`product` AS product_sales_product,&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 12px; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SUM(product_sales.`sales`) AS product_sales_sales&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 12px; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;FROM&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 12px; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;`product_sales` product_sales&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #ffe599;"&gt;&lt;span style="color: #38761d; font-family: 'Courier New'; font-size: 12px; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;WHERE&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #38761d; font-family: 'Courier New'; font-size: 12px; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;product_sales.`continent`=$P{CONTINENT_CHART}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 12px; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;GROUP BY 1&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 12px; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;ORDER BY 1&lt;/span&gt;&lt;span style="background-color: transparent; background-color: transparent; font-family: Arial; font-size: 15px; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; background-color: transparent; font-family: Arial; font-size: 15px; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 15px; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Now everything will be working as intended. The parameter will now be passed from the main report to the chart (which is kind of a hidden sub-report). This method works for Lists, Tables and Crosstabs as well.&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4527276399966185267-4323141554433918982?l=diethardsteiner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://diethardsteiner.blogspot.com/feeds/4323141554433918982/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://diethardsteiner.blogspot.com/2011/11/jaspersoft-ireport-how-to-pass.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4527276399966185267/posts/default/4323141554433918982'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4527276399966185267/posts/default/4323141554433918982'/><link rel='alternate' type='text/html' href='http://diethardsteiner.blogspot.com/2011/11/jaspersoft-ireport-how-to-pass.html' title='Jaspersoft iReport: How to pass a parameter to a sub-dataset'/><author><name>Diethard Steiner</name><uri>https://profiles.google.com/101564429460248850938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4527276399966185267.post-5441918370343942441</id><published>2011-11-04T15:41:00.001-07:00</published><updated>2011-11-05T02:51:19.708-07:00</updated><title type='text'>Star Schema Modeling with Pentaho Data Integration</title><content type='html'>&lt;br /&gt;&lt;div style="background-color: transparent;"&gt;&lt;span id="internal-source-marker_0.36177579406648874" style="background-color: transparent; font-family: Arial; font-size: 14pt; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Star Schema Modeling with Pentaho Data Integration&lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Tutorial Details&lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li style="background-color: transparent; font-family: Arial; font-size: 11pt; list-style-type: disc; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="background-color: transparent; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Software (this tutorial was published on 2011-11-04 and download sources were correct on this date but might change in future): &lt;/span&gt;&lt;/li&gt;&lt;ul&gt;&lt;li style="background-color: transparent; font-family: Arial; font-size: 11pt; list-style-type: circle; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="background-color: transparent; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;pdi-ce-4.3.0-M1 (download &lt;/span&gt;&lt;a href="http://ci.pentaho.com/job/Kettle/"&gt;&lt;span style="background-color: transparent; color: #000099; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"&gt;here&lt;/span&gt;&lt;/a&gt;&lt;span style="background-color: transparent; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;)&lt;/span&gt;&lt;/li&gt;&lt;li style="background-color: transparent; font-family: Arial; font-size: 11pt; list-style-type: circle; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="background-color: transparent; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Star Modeler plug-in (download &lt;/span&gt;&lt;a href="http://kettle4.s3.amazonaws.com/starmodeler.zip"&gt;&lt;span style="background-color: transparent; color: #000099; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"&gt;here&lt;/span&gt;&lt;/a&gt;&lt;span style="background-color: transparent; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;)&lt;/span&gt;&lt;/li&gt;&lt;li style="background-color: transparent; font-family: Arial; font-size: 11pt; list-style-type: circle; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="background-color: transparent; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;MySQL or similar database&lt;/span&gt;&lt;/li&gt;&lt;li style="background-color: transparent; font-family: Arial; font-size: 11pt; list-style-type: circle; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="background-color: transparent; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Star Schema file produced in this tutorial (download &lt;/span&gt;&lt;a href="https://docs.google.com/open?id=0B-yuO-Oixq4RZGJiZDExYWItMWM0NC00Y2QwLWJhNDEtYWVmZTVhNjJlYjJl"&gt;&lt;span style="background-color: transparent; color: #000099; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"&gt;here&lt;/span&gt;&lt;/a&gt;&lt;span style="background-color: transparent; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;)&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li style="background-color: transparent; font-family: Arial; font-size: 11pt; list-style-type: disc; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="background-color: transparent; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Knowledge: Intermediate (To follow this tutorial you should have good knowledge of the software and hence not every single step will be described)&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 dir="ltr"&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 18pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Introduction&lt;/span&gt;&lt;/h2&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Matt Casters, lead developer of PDI, presented a &lt;/span&gt;&lt;a href="http://www.ibridge.be/?p=206"&gt;&lt;span style="background-color: transparent; color: #000099; font-family: Arial; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"&gt;new feature &lt;/span&gt;&lt;/a&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;this week for modeling star schemata within PDI. It’s in the very early stages, but already showing huge potential and this is the reason why I thought I prepare a quick tutorial about it.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Now why is this new feature so noteworthy:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li style="background-color: transparent; font-family: Arial; font-size: 11pt; list-style-type: disc; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="background-color: transparent; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;You can create your star schema model within the same interface as you create your ETL process, report models, analyzer models and which allows you to analyze your data as well. So, now it’s really like a start-to-finish environment.&lt;/span&gt;&lt;/li&gt;&lt;li style="background-color: transparent; font-family: Arial; font-size: 11pt; list-style-type: disc; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="background-color: transparent; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Other features can make use of the metadata you specified within the Star Modeler plug-in! In fact, one button click and PDI automatically generates a job which will run the DDL against the target database. Another click, and a simple ETL transformation gets automatically generated to populate your dimensions. You can use the transformation as a starting point and further improve it if necessary. In future you will be also able to auto-generate the reporting (&lt;/span&gt;&lt;span style="background-color: transparent; font-size: 11pt; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Pentaho Metadata&lt;/span&gt;&lt;span style="background-color: transparent; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;) model and the Mondrian (&lt;/span&gt;&lt;span style="background-color: transparent; font-size: 11pt; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Pentaho Analysis&lt;/span&gt;&lt;span style="background-color: transparent; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;) model. By how much will this speed up your development process? I would say a lot!&lt;/span&gt;&lt;/li&gt;&lt;li style="background-color: transparent; font-family: Arial; font-size: 11pt; list-style-type: disc; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="background-color: transparent; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;From my point of view Matt also included some really nifty features, in example, when you specify a table as date dimension, you have the possibility to let PDI auto-generate one for you. The source data to target data mapping is also quite nicely integrated.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;The plug-in architecture of PDI allows to add new features quite easily. The &lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Star Modeler&lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt; can be downloaded from &lt;/span&gt;&lt;a href="http://kettle4.s3.amazonaws.com/starmodeler.zip"&gt;&lt;span style="background-color: transparent; color: #000099; font-family: Arial; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"&gt;here&lt;/span&gt;&lt;/a&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt; (status: 2011-11-04). Unzip the file in the PDI plug-ins folder and (re)start Spoon. The Star Modeler will now show up as an additional perspective on the top right hand side.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Note&lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;: As said, this feature is still in development, so not everything might work as expected.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;In this tutorial we will be working with an extremely simple example. The idea is not to generate a full blown star schema, but to demonstrate the features of the &lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Star Modeler&lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt; plug-in.&lt;/span&gt;&lt;br /&gt;&lt;h2 dir="ltr"&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 18pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Getting Ready&lt;/span&gt;&lt;/h2&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Let’s create our source tables, so that we have some data to work with. Run the following SQL statements in your favourite SQL client:&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 10pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;CREATE SCHEMA&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 10pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;source_db&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 10pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 10pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;USE&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 10pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;source_db&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 10pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 10pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;CREATE TABLE&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 10pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;revenue&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 10pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;(&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 10pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;date DATE,&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 10pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;country_iso_code VARCHAR(3),&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 10pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;revenue DECIMAL&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 10pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 10pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 10pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;INSERT INTO&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 10pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;revenue&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 10pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;VALUES&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 10pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;('2011-11-01','GB',22314),&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 10pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;('2011-11-02','GB',23411),&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 10pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;('2011-11-03','GB',22325),&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 10pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;('2011-11-04','GB',22233),&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 10pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;('2011-11-01','US',32423),&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 10pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;('2011-11-02','US',25325),&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 10pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;('2011-11-03','US',43523),&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 10pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;('2011-11-04','US',23453)&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 10pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 10pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 10pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 10pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;CREATE TABLE &lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 10pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Countries&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 10pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;(&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 10pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;country_iso_code VARCHAR(3),&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 10pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;country_name VARCHAR(100)&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 10pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 10pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 10pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;INSERT INTO&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 10pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Countries&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 10pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;VALUES&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 10pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;('GB','United Kingdom'),&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 10pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;('US','United States of America')&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 10pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 10pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: 'Courier New'; font-size: 10pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Now let’s create our target database:&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 10pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;CREATE SCHEMA&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 10pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;target_db&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: #38761d; font-family: 'Courier New'; font-size: 10pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;;&lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Our aim is to create this rather simple star schema:&lt;/span&gt;&lt;br /&gt;&lt;img height="93px;" src="https://docs.google.com/drawings/image?id=smZsHpWxYoF6afhQlNIPmkg&amp;amp;w=506&amp;amp;h=93&amp;amp;rev=61&amp;amp;ac=1" width="506px;" /&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;h2 dir="ltr"&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 18pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Defining Database Connection Details&lt;/span&gt;&lt;/h2&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Start &lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Spoon&lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;. Currently the Star Modeler sources database information from the &lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;shared.xml &lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;file. So if you haven’t locally share any of your database details yet, create an empty transformation and specify two database connection:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li style="background-color: transparent; font-family: Arial; font-size: 11pt; list-style-type: disc; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="background-color: transparent; font-size: 11pt; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;source_db&lt;/span&gt;&lt;span style="background-color: transparent; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="background-color: transparent; font-family: Arial; font-size: 11pt; list-style-type: disc; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="background-color: transparent; font-size: 11pt; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;target_db&lt;/span&gt;&lt;span style="background-color: transparent; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Click on the &lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; font-style: italic; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;View&lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt; tab and right click on &lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; font-style: italic; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Database Connections&lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;. Click on &lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; font-style: italic; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;New&lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt; then. Fill out all the details for both connections.&lt;/span&gt;&lt;br /&gt;&lt;img height="260px;" src="https://lh4.googleusercontent.com/XKaftoCNLQb4YiILfMuGxhDZ-kbhBd9oVtyCyI0OSPlXEOmSXj8hX46skBMfXGhmRV3_DaTJdyqnCF9aM6kNAO9gIgV1iE-oZ57jG3dJy866nkpn9cU" width="582px;" /&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Once done, right click on them and choose &lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; font-style: italic; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Share&lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;:&lt;/span&gt;&lt;br /&gt;&lt;img height="300px;" src="https://lh4.googleusercontent.com/bd8iNWqQpG0BH3kQlLWRh1L-OoTjUfKPs-8CGXKGXSDCtWqje-nJ4PBendQ9ZRRljMdyPcuV08DEzaRIdqsz-yxTYLnPqVJiqaRvJ-BUJ3FSj8sQtW8" width="424px;" /&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Note&lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;: There will be a better way to define database connection details to be used with the &lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Star Modeler&lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt; in future.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Save your transformation.&lt;/span&gt;&lt;br /&gt;&lt;h2 dir="ltr"&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 18pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;How to Create a Star Model&lt;/span&gt;&lt;/h2&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Now that we have the connection details defined, let’s click on the &lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; font-style: italic; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Star Models&lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt; perspective in the right top hand side corner:&lt;/span&gt;&lt;br /&gt;&lt;img height="100px;" src="https://lh4.googleusercontent.com/cWtfb9PlZAvhJHnqYevrL8L2g_wyLDToLnszkBx3zu47ReH47G2MC_EwCeYdI64hPOHrEMRpZpZEU3PsojZKwv4akhwXkBpbkoq47aqw-Gi_P7RKe7o" width="498px;" /&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;You will be greeted by a blank screen. Now click on the &lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; font-style: italic; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;New&lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt; icon and choose &lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; font-style: italic; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Star Model&lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;:&lt;/span&gt;&lt;br /&gt;&lt;img height="184px;" src="https://lh3.googleusercontent.com/q62FqTXM-OyFKU6cUDpl7AKmZFWQzZAC46rePHAEBfVIG301jcwrXbCoirxsSlnVD02FwET-3AwAU6J-IVpVJ9wlEOiD6e71CmppMYao3Ny-csv4KcQ" width="279px;" /&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Give the star model a name and description. Then choose &lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; font-style: italic; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;target_db&lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt; as our target database.&lt;/span&gt;&lt;br /&gt;&lt;img height="401px;" src="https://lh3.googleusercontent.com/aLHY8qfdx2wFkLHBTLBgTFFOdSshFVaHoATXOxtadzX4U9ynGEt7YfHGk8tf-7k5PcK7X93Cqm44UkFqud4NY6bTKykZhCFoalnjI0S72S0Mn-TfvKA" width="587px;" /&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Click on &lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; font-style: italic; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Create New Model&lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt; and fill out the form as shown below:&lt;/span&gt;&lt;br /&gt;&lt;img height="207px;" src="https://lh5.googleusercontent.com/KLEJuwWimbfsXlWhzoSSd38d75aGDK2G8MRGpiqeO64fsyZmkpEouMhyId6AXN3-Hqm_H9Fm3h4MrbC0VJhIyCXDNMjbDv_LhfQGaPLkHBHwzHhVTZg" width="475px;" /&gt;&lt;br /&gt;&lt;h3 dir="ltr"&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 14pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Creating Dimensions&lt;/span&gt;&lt;/h3&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Next click on the &lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; font-style: italic; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Dimensions&lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt; tab and click on &lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; font-style: italic; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;New Dimension&lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;:&lt;/span&gt;&lt;br /&gt;&lt;img height="198px;" src="https://lh3.googleusercontent.com/LZ2N_6IC40VpWPFo2PwcNrvym9pHqjSrEIYSQbKrFypBIT2XOj9RMUVdKeGoj9VZ-12b6rAv5ESHmK70eyfLazRJFD7jtKLjJp4OV-Xd28G_oI7pfc0" width="450px;" /&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Let’s create our date dimension: Fill out as shown below. Make sure that you choose &lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;DATE&lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt; as&amp;nbsp;&lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; font-style: italic; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Dimension Type&lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;img height="185px;" src="https://lh6.googleusercontent.com/t_70RuOxtEONd-QB_fe255eETLkONClegJPWw7Mt-8lIi-Tiw7Usn-D1wQvosuCaEyv9wOQuWzWvY31rQO72Dds4qI2QmdVrZ6Vaf8_l5RRyueMMK0Q" width="459px;" /&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Now click on the &lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; font-style: italic; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Attributes definitions&lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt; tab and then on &lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; font-style: italic; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Add default dimension fields&lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;:&lt;/span&gt;&lt;br /&gt;&lt;img height="303px;" src="https://lh4.googleusercontent.com/55zLV04rCATZg2ziQPkVymcQTCjTByWcSmP1uVsmk4axbmQZeE6InfXevje0bxVqpjyLe9YWigU37gTir1wz0XA9yW_JUtgX1XQCmW5CwVnMefwSpao" width="553px;" /&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;You will realize that PDI proposes a quite complete date dimension structure out-of-the-box. What a time saver! We are for now quite happy with this (if you want, you can change this), and click on &lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; font-style: italic; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;OK&lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;So we have now defined our date dimension. Let’s go ahead and work on our country dimension:&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Click on &lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; font-style: italic; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;New Dimension&lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;:&lt;/span&gt;&lt;br /&gt;&lt;img height="194px;" src="https://lh3.googleusercontent.com/vuh5g0WK435f1iV1zF5pcWPt7sbygIT65yns3ztPifIYu87h7dDw5L8rZN2RZJXQX3a4yxFFT8f5zQxDSOB_oF_YKASx2H5Uxptz_ig8d43jhKr5WBI" width="457px;" /&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Define the following (Make sure you choose &lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;SLOWLY_CHANGING_DIMENSION &lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;for &lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; font-style: italic; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Dimension Type&lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;):&lt;/span&gt;&lt;br /&gt;&lt;img height="169px;" src="https://lh4.googleusercontent.com/YihMg8B1U532AhyeAabUyNd57cNhv3XLEMrinWdPI6Zf-4qfmmDC3Q4vjpTt1s9PZrfsv9Mk9BvV_ED19D5EHVJ46RMzBUY2RVn33zxHsOj3cHxhTL8" width="458px;" /&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Next click on the &lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; font-style: italic; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Attributes definitions &lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;tab and click on &lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; font-style: italic; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Add default dimension fields&lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;:&lt;/span&gt;&lt;img height="182px;" src="https://lh4.googleusercontent.com/1adrWoYhsYctj_ozFt2tlHF29Xv92Up_G81Z-yOQ5rTJyHJT-9BRONI0vM0WoMuhyehnx6iOUnkCM68Dy_xLSYr-Zq4I_LIGvDhPtSfI6P2qG2fTLgQ" width="558px;" /&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;If you are familiar with &lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Ralph Kimball&lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;’s slowly changing dimensions, you will realize that PDI makes really good suggestions. Just change:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li style="background-color: transparent; font-family: Arial; font-size: 11pt; list-style-type: disc; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="background-color: transparent; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;the &lt;/span&gt;&lt;span style="background-color: transparent; font-size: 11pt; font-style: italic; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Physical name&lt;/span&gt;&lt;span style="background-color: transparent; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;s (replace the ??? with real names)&lt;/span&gt;&lt;/li&gt;&lt;li style="background-color: transparent; font-family: Arial; font-size: 11pt; list-style-type: disc; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="background-color: transparent; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;the natural key to country_iso_code (data type: string) and add country_name as additional attributes. &lt;/span&gt;&lt;/li&gt;&lt;li style="background-color: transparent; font-family: Arial; font-size: 11pt; list-style-type: disc; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="background-color: transparent; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;specify the &lt;/span&gt;&lt;span style="background-color: transparent; font-size: 11pt; font-style: italic; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Source DB&lt;/span&gt;&lt;span style="background-color: transparent; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;, &lt;/span&gt;&lt;span style="background-color: transparent; font-size: 11pt; font-style: italic; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Source table&lt;/span&gt;&lt;span style="background-color: transparent; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt; and &lt;/span&gt;&lt;span style="background-color: transparent; font-size: 11pt; font-style: italic; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Source column&lt;/span&gt;&lt;span style="background-color: transparent; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt; for country_iso_code and country_name.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;It should look then like this:&lt;/span&gt;&lt;br /&gt;&lt;img height="216px;" src="https://lh6.googleusercontent.com/q1i9qBCOU10L0-493N-_5ErzOw5mTs4epIb2rCt1cxQ5hqp_jOo4_QSW9N055mi4ivjzQ4AKBoXBwEykEJ3Y_hnlccMK-7FzBxB13y10KaCzAx9UH_A" width="590px;" /&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Click &lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; font-style: italic; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;OK. &lt;/span&gt;&lt;br /&gt;&lt;h3 dir="ltr"&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 14pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Creating a Fact Table&lt;/span&gt;&lt;/h3&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;In the &lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; font-style: italic; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Star Model&lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt; window click on the &lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; font-style: italic; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Fact&lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt; tab and click on &lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; font-style: italic; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Add dimension keys&lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;. Now PDI automatically insert the technical keys of the &lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;dimensions&lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt; we defined before.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Add an additional attribute called &lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;revenue&lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;, provide the details as shown below (make sure you also specify the &lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;source&lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;):&lt;/span&gt;&lt;br /&gt;&lt;img height="249px;" src="https://lh6.googleusercontent.com/ysl50J5JRMV8_SsNrQkbbMqBH_INnh9APSZzJjgSOQhMHgfn7JdOp_k5vj4aUPcjykO3WUDqi5swufrzwsK15AHwAblu595owZmfklTQXxD4hwq8cGk" width="596px;" /&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Our &lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;fact table&lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt; is now properly defined. &lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Click on the &lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; font-style: italic; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Start model info &lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;tab and you will now see a simple graphical representation of our &lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;star model&lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;:&lt;/span&gt;&lt;br /&gt;&lt;img height="224px;" src="https://lh6.googleusercontent.com/WYB3LsNjKfeJ832zDinjFYf1sOPf1WYrVdngEEzCKFSvsR4pjFeRApQEKFK3v8OtQLi-fd1bp8JLDIwM0ye4X6-MqbXG2idUI7GE5seoBFH7ChQ6PBY" width="611px;" /&gt;&lt;br /&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Click &lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; font-style: italic; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;OK&lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;h2 dir="ltr"&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 18pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Automatic Generation Features&lt;/span&gt;&lt;/h2&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Now that our &lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;star model&lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt; is defined, PDI gives us the option to automatically generate the following by just the click on a button:&lt;/span&gt;&lt;img height="47px;" src="https://lh6.googleusercontent.com/cnXEYm4hE8NjkcFpYdsBqQlGE010s4ezkni1U9x0LX7WlZK702WQj6XLUcse4UnQjsma07ucuj9tNvBbrZvmlRxKjNejZCLKxNbAex_oWWmEd472R84" width="592px;" /&gt;&lt;br /&gt;&lt;h3 dir="ltr"&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 14pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;SQL DDL Job&lt;/span&gt;&lt;/h3&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;This job will allow you to automatically create the DDL for the target database. Just click on &lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; font-style: italic; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;SQL Job&lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt; and a second later you will see a job like this:&lt;/span&gt;&lt;br /&gt;&lt;img height="437px;" src="https://lh6.googleusercontent.com/NzdzMwTuUalXqDon0doaY5DSYxR9NQaNqoEOeZEAYruUx7uzGpDsbVpFCI37LGJIX6-UVcLdhTdw2twcRRy0B58DkZj1c4UdcqUjnBqoeridJrNNRKs" width="593px;" /&gt;&lt;br /&gt;&lt;h3 dir="ltr"&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 14pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Update Dimensions (Domain Job)&lt;/span&gt;&lt;/h3&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;By clicking on &lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; font-style: italic; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Domain Job&lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt; PDI will generate a simple transformation to update your dimensions:&lt;/span&gt;&lt;br /&gt;&lt;img height="229px;" src="https://lh5.googleusercontent.com/gFN1ta7xyyewwCo8lrxgnh6NaWhJk2WB1USrIr5tX2HZAk7nX9UHnmUyMgM-wYCOmStbMhL4HZfMWL9DpwZx0i5ID3zzz1zRy199Y1ESJI3zEMPy7Mc" width="585px;" /&gt;&lt;br /&gt;&lt;h3 dir="ltr"&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 14pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Pentaho Metadata Model (Physical Model)&lt;/span&gt;&lt;/h3&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;This feature is currently under development.&lt;/span&gt;&lt;br /&gt;&lt;h3 dir="ltr"&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 14pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Pentaho Analyzer Model (Mondrian Schema)&lt;/span&gt;&lt;/h3&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;This feature is currently under development.&lt;/span&gt;&lt;br /&gt;&lt;h3 dir="ltr"&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 14pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Documentation&lt;/span&gt;&lt;/h3&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;This feature is currently under development. &lt;/span&gt;&lt;br /&gt;&lt;h2 dir="ltr"&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 18pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Conclusion&lt;/span&gt;&lt;/h2&gt;&lt;span style="background-color: transparent; font-family: Arial; font-size: 11pt; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;I hope that this simple tutorial demonstrated the huge potential of this new feature. It will certainly get better and better over time, so watch the space!&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4527276399966185267-5441918370343942441?l=diethardsteiner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://diethardsteiner.blogspot.com/feeds/5441918370343942441/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://diethardsteiner.blogspot.com/2011/11/star-schema-modeling-with-pentaho-data.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4527276399966185267/posts/default/5441918370343942441'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4527276399966185267/posts/default/5441918370343942441'/><link rel='alternate' type='text/html' href='http://diethardsteiner.blogspot.com/2011/11/star-schema-modeling-with-pentaho-data.html' title='Star Schema Modeling with Pentaho Data Integration'/><author><name>Diethard Steiner</name><uri>https://profiles.google.com/101564429460248850938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4527276399966185267.post-3997500743197417390</id><published>2011-07-30T02:37:00.001-07:00</published><updated>2011-07-30T02:39:29.104-07:00</updated><title type='text'>Pentaho Data Integration 4 Cookbook - Book Review</title><content type='html'>&lt;h2&gt;&lt;font face="verdana" size="2"&gt;&lt;b&gt;Book Review: Pentaho Data Integration 4 Cookbook&lt;/b&gt;&lt;/font&gt;&lt;/h2&gt;&lt;div&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;&lt;font face="verdana" size="2"&gt;&lt;b&gt;&lt;a href="http://link.packtpub.com/avTKhf" id="yh71" title="Pentaho Data Integration 4 Cookbook"&gt;Pentaho Data Integration 4 Cookbook&lt;/a&gt;&lt;/b&gt;&amp;nbsp;by&amp;nbsp;&lt;/font&gt;&lt;font face="verdana, sans-serif"&gt;&lt;font color="#333333"&gt;Mar&amp;iacute;a Carina Roldan and Adri&amp;aacute;n Sergio Pulvirenti illustrates with plenty examples how data can be imported from various sources, transformed and exported to various sources with the open source tool &lt;b&gt;Kettle &lt;/b&gt;(Pentaho Data Integration). It&amp;#39;s all a hands-down approach: Follow the step by step guide of the examples and you will have the right knowledge at the end of the book to create your own data integration solutions. The book is easy to read even for novices and offers a great introduction to the world of Pentaho Kettle.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;br&gt;&lt;/font&gt;&lt;div&gt;&lt;font face="verdana" size="2"&gt;In times of economic downturn and an extremely competitive market companies are trying to save money where ever possible. In the last few years we have seen a trend towards open source business intelligence solutions. The quality and functionality of open source business intelligence tools has increased over time as well and nowadays they are a very convincing alternative to very costly commercial business intelligence solutions.&lt;/font&gt;&lt;br&gt;&lt;font size="2"&gt;&lt;br&gt;&lt;/font&gt;&lt;div&gt;&lt;font face="verdana" size="2"&gt;For a lot of open source business intelligence tools, documentation has been a weak point in the past. Some products have a really strong community following and maybe a Wiki, which were often you main source of information. In the last 2 years this situation changed: There are now some publications available that cover some of these open source business intelligence packages, one of the very recent one being &lt;b&gt;Pentaho Data Integration 4 Cookbook&lt;/b&gt;&amp;nbsp;by&amp;nbsp;&lt;/font&gt;&lt;font face="verdana, sans-serif"&gt;&lt;font color="#333333"&gt;Mar&amp;iacute;a Carina Roldan and Adri&amp;aacute;n Sergio Pulvirenti.&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;&lt;br&gt;&lt;div&gt;Data Integration (ETL, short for extract, transform, load data) is one of the most important building blocks of a business intelligence solution. You can have the fanciest dashboards and reports, but if you don&amp;#39;t have the correct data for them, they are pretty useless. ETL involves sourcing that data from a database, text file, Excel spreadsheet etc, transforming the data and outputting it to any convenient file format or database. Most ETL tools offer a graphical user interface which allows you to create data flows. The beauty of this is that there is hardly any coding involved, it is easy to understand (as you are looking at a flow diagram) and you are working quicker as well (you are not coding everything). Nowadays, the probably two most popular open source ETL tools are &lt;b&gt;Pentaho Data Integration&lt;/b&gt;&amp;nbsp;and &lt;b&gt;Talend&lt;/b&gt;. &amp;nbsp;&lt;/div&gt;&lt;br&gt;&lt;div&gt;&lt;font size="2"&gt;&lt;font face="verdana"&gt;&lt;b&gt;Pentaho Data Integration 4 Cookbook &lt;/b&gt;is an ideal book for somebody who looks for a hands-down tutorial-style book. It is filled with an abundance of examples and you can download the accompanying files from the dedicated website as well. Now what does this book cover:&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;&lt;font size="2"&gt;&lt;br&gt;&lt;/font&gt;&lt;div&gt;&lt;font size="2"&gt;&lt;font face="verdana"&gt;The first chapter is all about how to get data from databases, parameterizing SQL queries and updating/deleting records from database tables. Especially interesting is the section about using parameters with your SQL query to dynamically source your data. The authors also explain how you can generate primary key values for your dataset in Kettle in case your database table requires them.&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font size="2"&gt;&lt;font face="verdana"&gt;The second chapter focuses on getting data from text files. Rich examples are provided to handle structured as well as instructed text files. Especially the section about working with various forms of unstructured text files is really informative. The last section of the chapter is all about retrieving data from Excel spreadsheets.&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font face="verdana"&gt;Chapter 3 focuses on working with XML files: Kettle offers features to read, validate and generate XML documents.&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font size="2"&gt;&lt;font face="verdana"&gt;Kettle is not only an ETL tool, but also offers workflow management as well: This book gives a good overview on how to create jobs, which allow to run transformations and other tasks (e.g. send email email notifications, create folders, check if a file exists, etc) in sequential order. File management is covered next, which looks at copying, moving and deleting files and folders. Once you imported the data, you also might have to look up some additional data from other sources, so chapter 5 gives you a good overview on this topic. There is really one nifty example: It is about transforming data about museums and looking about the opening hours by using a web service.&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font size="2"&gt;&lt;font face="verdana"&gt;Up next: Learn how to split, merge and compare data streams. &lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font face="verdana"&gt;Chapter 7 shows you how to execute and reuse jobs and transformations. Then it&amp;#39;s all about how you can integrate your Kettle ETL processes with the other Pentaho products (Business Intelligence Server, Report Designer, Dashboards etc). The final chapter learns you the tricks on how get the most out of Kettle.&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;&lt;font size="2"&gt;&lt;br&gt;&lt;/font&gt;&lt;div&gt;&lt;font size="2"&gt;&lt;font face="verdana"&gt;All in all, &lt;a href="http://link.packtpub.com/avTKhf" id="i5bs" title="this book"&gt;this book&lt;/a&gt; is in excellent read for somebody who wants to have a quick start in open source ETL process design. The book is fully based on examples, which explained in an easy to understand language. There are many illustrations as well and at the end of each example you will find a summary and sometimes hints on where to find more info. This book is ideal for somebody who wants to get up and running with this popular open source ETL tool in a short amount of time. If you interested in this book, you can get it directly from &lt;a href="http://link.packtpub.com/avTKhf" id="ftmh" title="here"&gt;here&lt;/a&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4527276399966185267-3997500743197417390?l=diethardsteiner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://diethardsteiner.blogspot.com/feeds/3997500743197417390/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://diethardsteiner.blogspot.com/2011/07/pentaho-data-integration-4-cookbook.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4527276399966185267/posts/default/3997500743197417390'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4527276399966185267/posts/default/3997500743197417390'/><link rel='alternate' type='text/html' href='http://diethardsteiner.blogspot.com/2011/07/pentaho-data-integration-4-cookbook.html' title='Pentaho Data Integration 4 Cookbook - Book Review'/><author><name>Diethard Steiner</name><uri>https://profiles.google.com/101564429460248850938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4527276399966185267.post-478393566338275941</id><published>2011-07-12T06:19:00.001-07:00</published><updated>2011-07-12T06:19:43.455-07:00</updated><title type='text'>Metadata Driven ETL and Reporting</title><content type='html'>&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;span id="internal-source-marker_0.2401555790565908" style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="arial"&gt;&lt;font color="#000000"&gt;&lt;font size="5"&gt;&lt;b&gt;Metadata Driven ETL and Reporting with Pentaho Data Integration and Report Designer&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;b&gt;&lt;br&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;b&gt;Tutorial Details&amp;nbsp;&lt;/b&gt;&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Software&lt;/b&gt;: If PDI Kettle 4.2 GA and PRD 3.8.1 GA or later are available, download them from &lt;a href="http://sourceforge.net/projects/pentaho/files/" id="vs1k" title="Sourceforge"&gt;Sourceforge&lt;/a&gt;, otherwise here:&amp;nbsp;&lt;a href="http://ci.pentaho.com/view/Data%20Integration/job/Kettle/" id="yi4m" title="PDI/Kettle 4.2 latest stable version"&gt;PDI/Kettle 4.2 latest stable version&lt;/a&gt; and &lt;a href="http://ci.pentaho.com/view/Reporting/job/PRD/" id="gk9j" title="PRD 3.8.1 latest stable version"&gt;PRD 3.8.1 latest stable version&lt;/a&gt;&amp;nbsp;(Note: Do not use these &lt;i&gt;last stable&lt;/i&gt;&amp;nbsp;versions in a production environment)&lt;/li&gt;&lt;li&gt;&lt;b&gt;Knowledge&lt;/b&gt;: Intermediate (To follow this tutorial you should have good knowledge of the software and hence not every single step will be described)&lt;/li&gt;&lt;li&gt;&lt;b&gt;OS&lt;/b&gt;: Windows, Linux or Mac OS X&lt;/li&gt;&lt;li&gt;Tutorial files can be downloaded &lt;a href="http://docs.google.com/leaf?id=0B-yuO-Oixq4RMjQ3MzZlZDctMGJmZS00MmE2LTk4YzYtYWI0YmFlOWMyY2M4&amp;amp;hl=en_GB" id="zmd7" title="here"&gt;here&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="writely-toc" id="WritelyTableOfContents" toctype="none+none"&gt;&lt;ol class="writely-toc-none"&gt;&lt;li&gt;&lt;a href="#Foreword_6493989964947104_0579" target="_self"&gt;Acknowledgment&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="#Introduction_3204216002486646__5209392488468438" target="_self"&gt;Introduction&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="#Creating_a_Metadata_Driven_Rep" target="_self"&gt;Creating a Metadata Driven Report&lt;/a&gt;&lt;/li&gt;&lt;ol class="writely-toc-none writely-toc-subheading" style="margin-left:0"&gt;&lt;li&gt;&lt;a href="#Defining_the_query_75824490049_6186921529006213" target="_self"&gt;Defining the query&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="#Defining_the_report_pre_proces" target="_self"&gt;Defining the report pre-processor&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="#Designing_the_report_326501507_7698043929412961" target="_self"&gt;Designing the report&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;li&gt;&lt;a href="#Together_we_are_stronger_Penta" target="_self"&gt;Together we are stronger: Pentaho Data Integration and Pentaho Report Designer for total flexibility&lt;/a&gt;&lt;/li&gt;&lt;ol class="writely-toc-none writely-toc-subheading" style="margin-left:0"&gt;&lt;li&gt;&lt;a href="#Metadata_driven_ETL_6192636454_40449062874540687" target="_self"&gt;Metadata driven ETL&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="#PDI_Data_Source_in_Pentaho_Rep" target="_self"&gt;PDI Data Source in Pentaho Report Designer&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="#Room_for_improvement_390104996_9739320673979819" target="_self"&gt;Room for improvement&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;li&gt;&lt;a href="#Working_with_fixed_width_MDX_o" target="_self"&gt;Working with fixed width MDX output in Pentaho Report Designer&lt;/a&gt;&lt;/li&gt;&lt;ol class="writely-toc-none writely-toc-subheading" style="margin-left:0"&gt;&lt;li&gt;&lt;a href="#Changing_the_Report_Designer_s_8067882657051086" target="_self"&gt;Changing the Report Designer settings&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="#Defining_a_query_9946864454541_3540988080203533" target="_self"&gt;Defining a query&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;li&gt;&lt;a href="#Working_with_dynamic_MDX_outpu" target="_self"&gt;Working with dynamic MDX output in Pentaho Report Designer&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="#Conclusion" target="_self"&gt;Conclusion&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;br&gt;&lt;/div&gt;&lt;h2&gt;&lt;a id="Foreword_6493989964947104_0579" name="Foreword_6493989964947104_0579"&gt;&lt;/a&gt;Acknowledgment&lt;/h2&gt;&lt;div&gt;I would like to thank both &lt;b&gt;Matt Casters&lt;/b&gt; (Chief Data Integration, Pentaho) and &lt;b&gt;Thomas Morgner&lt;/b&gt; (Chief Reporting, Pentaho) for providing me answers on all the questions that I had on this interesting topic.&amp;nbsp;&lt;/div&gt;&lt;h2&gt;&lt;a id="Introduction_3204216002486646__5209392488468438" name="Introduction_3204216002486646__5209392488468438"&gt;&lt;/a&gt;Introduction&lt;/h2&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;This tutorial will demonstrate how you can create extremely flexible data processing and reporting pipelines by using the metadata approach.&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;So what does &lt;b&gt;&lt;i&gt;Metadata Driven&lt;/i&gt;&amp;nbsp;&lt;/b&gt;mean? Imagine you source various data fields from text files or a database, transform the data and then output a final pixel perfect report with summarized data. What happens if a new field shows up in the source data and it has to be added to the data processing and reporting pipeline? In the past this meant that you had to manually add this new field to nearly every step of your pipeline (change the ETL transformation and report template directly, or better said, hard code everything). Metadata driven means that you do not directly change ETL and reporting files, but only supply the name of the fields that have to be processed (and any other metadata).&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;br&gt;&lt;/div&gt;&lt;b&gt;This article focuses on three very interesting features in the Pentaho BI Suite&lt;/b&gt;:&lt;br&gt;&lt;ul&gt;&lt;li&gt;Metadata driven ETL processes with Pentaho Data Integration (Kettle)&lt;/li&gt;&lt;li&gt;Index column reports in Pentaho Report Designer (PDR) which allow extremely flexible report definitions and can utilize the metadata provided by the data query&lt;/li&gt;&lt;li&gt;Pentaho Report Designer can source data from a Kettle transformation &amp;hellip; now this is an extremely powerful combination and opens up the door for a lot of new solutions&lt;/li&gt;&lt;/ul&gt;&lt;br&gt;&lt;b&gt;Now why do I think this is quite important:&lt;/b&gt;&lt;br&gt;&lt;ul&gt;&lt;li&gt;Some projects ask for a lot of flexibility in regards to ETL and reporting. New data points should be picked up ideally automatically and pushed to the report output. Now, by using Kettle and PDR together, you can even do this for real-time-reporting.&lt;/li&gt;&lt;li&gt;Another example is template driven ETL. As a developer you can create ETL processes that you can easily reuse for a lot of projects without inventing the wheel over and over again.&lt;/li&gt;&lt;li&gt;Using MDX output in PRD was a bit difficult at times. Imagine a scenario where you had to present the daily performance of the last 10 days. In MDX you can easily use a function to display the last 10 days. The result set might have the dates as columns, which is inconvenient, as they will always change. Hence so far you had to give each date column an alias (i.e.: &amp;ldquo;date_10_days_ago&amp;rdquo;) which would not change. Using an index column in PRD is extremely convenient, because you don&amp;rsquo;t have to worry about this complexity any more&lt;/li&gt;&lt;li&gt;&amp;hellip; and many more &amp;hellip;&lt;/li&gt;&lt;/ul&gt;&lt;br&gt;Certainly, this approach has its limitations. Not everything can just happen automatically, hence you have to consider carefully in which scenarios this approach will work well.&lt;/div&gt;&lt;h2&gt;&lt;a id="Creating_a_Metadata_Driven_Rep" name="Creating_a_Metadata_Driven_Rep"&gt;&lt;/a&gt;&lt;font size="4"&gt;&lt;b&gt;Creating a Metadata Driven Report&lt;/b&gt;&lt;/font&gt;&lt;/h2&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;h3&gt;&lt;a id="Defining_the_query_75824490049_6186921529006213" name="Defining_the_query_75824490049_6186921529006213"&gt;&lt;/a&gt;Defining the query&lt;/h3&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;Open &lt;b&gt;Pentaho Report Designer &lt;/b&gt;(PRD) and create a new report. Let&amp;rsquo;s set up a data source:&lt;br&gt;&lt;ol&gt;&lt;li&gt;Click on the &lt;b&gt;Data&lt;/b&gt; tab&lt;/li&gt;&lt;li&gt;Right click on &lt;b&gt;Data sets&lt;/b&gt; and add a &lt;b&gt;query&lt;/b&gt; (follow all the necessary steps)&lt;/li&gt;&lt;li&gt;Click &lt;b&gt;Ok&lt;/b&gt;&amp;nbsp;&lt;/li&gt;&lt;li&gt;Copy your query somewhere in a text editor or so to have it handy, then delete the data source in PRD&lt;/li&gt;&lt;li&gt;So now there shouldn&amp;rsquo;t be anything under &lt;b&gt;Data Sets&lt;/b&gt;. Right click on &lt;b&gt;Data Sets&lt;/b&gt; and choose &lt;b&gt;Advanced &amp;gt; JDBC (Custom)&lt;/b&gt;. In the settings dialog choose your database connetion details and then click OK.&lt;br&gt;&lt;div id="fynl" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_257hp9kgcd9_b" style="height:44px;width:258px"&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;In the &lt;b&gt;data&lt;/b&gt; tab, create a new &lt;b&gt;parameter&lt;/b&gt; called &lt;b&gt;Query&lt;/b&gt; (type: string)&lt;/li&gt;&lt;li&gt;Click on the &lt;b&gt;Structure&lt;/b&gt; tab and mark the &lt;b&gt;Master Report&lt;/b&gt;.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Click on the &lt;b&gt;Attributes&lt;/b&gt; tab and click on the query&amp;nbsp;&lt;b&gt;name&lt;/b&gt; value field. Insert your query here.&lt;br&gt;&lt;div id="gnsa" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_258gspms6g4_b" style="height:141px;width:521px"&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;Click on the query&amp;nbsp;&lt;b&gt;name&lt;/b&gt; formula icon (+) and insert following open formula: =[Query]&lt;/li&gt;&lt;/ol&gt;&lt;br&gt;&lt;br&gt;Do not drag and drop any fields onto the details band. Do not put any fields at all on the details band or the details header or footer! If you want to auto-generate the reports on the fly you have to use a scripted &lt;b&gt;pre-processor&lt;/b&gt; to configure the fields based on the structure of the result set returned by the query and then the &lt;b&gt;report design wizard&lt;/b&gt; generates the fields and formats for the report.&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;br&gt;&lt;a href="http://www.sherito.org/" id="hwqr" title="Thomas Morgner"&gt;Thomas Morgner&lt;/a&gt; explains:&amp;nbsp;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&amp;ldquo;&lt;i&gt;&lt;font color="#444444"&gt;A report-pre-processor is a specialized function that is executed after the report processing queried the data from the data-factory, but before the report&amp;#39;s functions get initialized and the actual report-processing starts. Each master- and sub-report can have its own set of report-processors. The pre-processor is executed only once for each report-definition. At this point in the processing chain, a pre-processor has full control over the layout and data-computation aspects of the report-definition. The pre-processors are defined on the &amp;quot;advanced::pre-processor&amp;quot; attribute of the &amp;quot;master-report&amp;quot; object.&lt;/font&gt;&lt;/i&gt;&amp;rdquo;&lt;br&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;More info can be found on the &lt;a href="http://wiki.pentaho.com/display/Reporting/15.+Report+Preprocessor"&gt;Pentaho Wiki&lt;/a&gt;.&lt;br&gt;&lt;h3&gt;&lt;a id="Defining_the_report_pre_proces" name="Defining_the_report_pre_proces"&gt;&lt;/a&gt;&lt;font size="3"&gt;&lt;b&gt;Defining the report pre-processor&lt;/b&gt;&lt;/font&gt;&lt;/h3&gt;&lt;ol&gt;&lt;li&gt;Click on the &lt;b&gt;Structure&lt;/b&gt; tab and mark the &lt;b&gt;Master Report&lt;/b&gt;&lt;/li&gt;&lt;li&gt;Click on the &lt;b&gt;Attributes&lt;/b&gt; tab and scroll down to the &lt;b&gt;wizard section&lt;/b&gt;&lt;/li&gt;&lt;li&gt;Set &lt;b&gt;wizard-enabled&lt;/b&gt; to true&lt;/li&gt;&lt;li&gt;Scroll down to the &lt;b&gt;advanced&lt;/b&gt; section&lt;/li&gt;&lt;li&gt;Click on the value field of &lt;b&gt;pre-processor&lt;/b&gt;&lt;/li&gt;&lt;li&gt;Add a &lt;b&gt;Relational Report Auto-Generator&lt;/b&gt;&amp;nbsp;and &lt;b&gt;Wizard Processor&lt;/b&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div id="i_.3" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_256c7vk78fz_b" style="height:193px;width:540px"&gt;&lt;/div&gt;&lt;br class="Apple-interchange-newline"&gt;&lt;table bgcolor="#eeeeee" border="1" bordercolor="#999999" cellpadding="3" cellspacing="0" width="100%"&gt;&lt;tbody&gt;&lt;tr style="text-align:left"&gt;&lt;td width="100%"&gt;&lt;b style="color:#cc0000"&gt;&lt;font size="3"&gt;Note:&lt;/font&gt;&lt;/b&gt;&lt;font size="3"&gt;&amp;nbsp;You can have a look at the code of the&amp;nbsp;&lt;/font&gt;&lt;b&gt;&lt;font size="3"&gt;Relational Report Auto-Generator&lt;/font&gt;&lt;/b&gt;&lt;font size="3"&gt;&amp;nbsp;by clicking twice on the name in the above shown dialog, then on the right hand side a &amp;quot;...&amp;quot; button will show up. Click this one, another dialog will come up, click on the value field of the script row and you will be shown the whole script. If you want, you can edit it here.&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br&gt;PRD includes some examples of report-pre-processors:&lt;br&gt;&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Flat output&lt;/b&gt; (RelationalAutoGeneratorPreProcessor): Places the fields in the detail band and the labes in the detail header&lt;/li&gt;&lt;li&gt;&lt;b&gt;WizardProcessor&lt;/b&gt;: Extended version of the one before, can be used as well to only refresh the metadata of predefined fields&lt;/li&gt;&lt;li&gt;&lt;b&gt;Most features&lt;/b&gt; (BSFReportPreProcessor): Use a scripting language to manipulate various settings&lt;/li&gt;&lt;/ul&gt;&lt;br&gt;Again, these are only examples, you can build your own report-pre-processor.&lt;br&gt;&lt;br&gt;The code for the report-pre-processor is stored as a expression-property within the report definition. The code uses the wizard-API to define the fields and then the wizard-process generates the fields. With this approach you can do whatever you want with the (GUI)-wizard itself.&lt;br&gt;&lt;br&gt;In case your are aiming for really fancy reports, you can add another report-pre-precessor after the wizard processor to post-process the fields generated by the wizard.&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;h3&gt;&lt;a id="Designing_the_report_326501507_7698043929412961" name="Designing_the_report_326501507_7698043929412961"&gt;&lt;/a&gt;&lt;b&gt;Designing the report&lt;/b&gt;&lt;/h3&gt;&lt;ol&gt;&lt;li&gt;Expand the &lt;b&gt;Structure&lt;/b&gt; tree and mark &lt;b&gt;Details Header&lt;/b&gt;&lt;/li&gt;&lt;li&gt;Click on the &lt;b&gt;Attributes&lt;/b&gt; tab and set &lt;b&gt;hide-on-canvas&lt;/b&gt; to &lt;b&gt;false&lt;/b&gt;&lt;/li&gt;&lt;li&gt;Do the same for the &lt;b&gt;Details Footer&lt;/b&gt;&lt;/li&gt;&lt;li&gt;Apply any format that you wish to the Details Header, Details and Details Footer (do not place any elements in these areas). I would advice to set at least font-size, text-color, background-color and height.&lt;/li&gt;&lt;/ol&gt;&lt;br class="Apple-interchange-newline"&gt;&lt;table bgcolor="#eeeeee" border="1" bordercolor="#999999" cellpadding="3" cellspacing="0" width="100%"&gt;&lt;tbody&gt;&lt;tr style="text-align:left"&gt;&lt;td width="100%"&gt;&lt;b style="color:#cc0000"&gt;&lt;font size="3"&gt;Note:&lt;/font&gt;&lt;/b&gt;&lt;font size="3"&gt;&amp;nbsp;&lt;/font&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="3"&gt;If you want to use bands, make sure you click on the Attributes tab, scroll down to the wizard section and set &lt;/font&gt;&lt;b&gt;&lt;font size="3"&gt;generate-content-marker&lt;/font&gt;&lt;/b&gt;&lt;font size="3"&gt; to true. Normally, if you define fields within the band, the wizard wouldn&amp;rsquo;t be used as the fields are explicitly set. By enabling generate-content-marker this behaviour is overwritten (the wizard removes your fields and brings its own fields).&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;Sample design:&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;div id="u-ps" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_259hmrx7cf4_b" style="height:560.3547671840355px;width:648px"&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;Now click on the &lt;b&gt;preview&lt;/b&gt; button and write any SQL query in the parameter field, then click&lt;b&gt;&amp;nbsp;Update&lt;/b&gt;. Your report will be generated on the fly and will look something like this:&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;div id="sjyg" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_260drt665fm_b" style="height:479.82698249227604px;width:648px"&gt;&lt;/div&gt;&lt;br class="Apple-interchange-newline"&gt;&lt;table bgcolor="#eeeeee" border="1" bordercolor="#999999" cellpadding="3" cellspacing="0" width="100%"&gt;&lt;tbody&gt;&lt;tr style="text-align:left"&gt;&lt;td width="100%"&gt;&lt;b style="color:#cc0000"&gt;&lt;font size="3"&gt;Note:&lt;/font&gt;&lt;/b&gt;&lt;font size="3"&gt;&amp;nbsp;&lt;/font&gt;&lt;font face="verdana"&gt;&lt;font size="3"&gt;This report setup is for illustration purposes only. I strongly advice to be very careful with allowing users to directly enter queries as this is a good target for SQL injections. Somebody could just enter a DELETE statement and execute it. So make sure you have the right security in place in case you really have to use this setup.&lt;/font&gt;&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;Someone unfamiliar with Pentaho Report Designer might wonder what is metadata driven in this example? Well, normally we would define all the fields in the details header, details and details footer bands. Here we didn&amp;#39;t define them at all, but relied on Pentaho Report Designer to make use of the query metadata and display the fields accordingly. This could be achieved by using the report pre-processer followed by the wizard functionality.&lt;/p&gt;&lt;h2&gt;&lt;a id="Together_we_are_stronger_Penta" name="Together_we_are_stronger_Penta"&gt;&lt;/a&gt;&lt;font size="4"&gt;Together we are stronger: Pentaho Data Integration and Pentaho Report Designer for total flexibility&lt;/font&gt;&lt;/h2&gt;&lt;p&gt;In this section I will try to highlight future potential of a metadata driven approach. Currently the tools don&amp;#39;t have all the necessary features, hence I will point out at the end what new features should be ideally added.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;h3&gt;&lt;a id="Metadata_driven_ETL_6192636454_40449062874540687" name="Metadata_driven_ETL_6192636454_40449062874540687"&gt;&lt;/a&gt;&lt;font size="3"&gt;&lt;b&gt;Metadata driven ETL&lt;/b&gt;&lt;/font&gt;&lt;/h3&gt;Now that we know how to set up a metadata driven report, we can have a look at creating a metadata driven ETL process to supply data to our metadata driven report template.&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;b&gt;PDI&lt;/b&gt; (Kettle) only recently received a new transformation step called &lt;b&gt;ETL Metadata Injection&lt;/b&gt;. The idea is to have one transformation that acts as a metadata injector to the main transformation. This main transformation is a skeleton of an ETL process: All the steps are defined, but not all or most of the metadata.&amp;nbsp;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;Currently not all transformation steps support metadata injection. Find below a list of steps that currently work with the &lt;b&gt;ETL Metadata Injection&lt;/b&gt;&amp;nbsp;step (status: July 2011):&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;CSV Input&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Excel Input&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Select Values&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Row De-normalizer&amp;nbsp;&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Row normalizer&lt;/b&gt;&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;So right now, the possibilites are quite limited, but this list will be growing over time as people start submitting requests on the &lt;a href="http://jira.pentaho.com" id="v04h" title="Pentaho JIRA website"&gt;Pentaho JIRA website&lt;/a&gt;. So if you already have an idea as to which transformation step should have metadata injection support, visit the aforementioned website and submit a JIRA feature request (ideally check first if there is not already one set up).&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;If you use the Metadata Injector step and point it to the main transformation, it will show which steps are supported.&amp;nbsp;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;As &lt;a href="http://www.ibridge.be/" id="f-y5" title="Matt Casters"&gt;Matt Casters&lt;/a&gt; put it: &amp;quot;&lt;i&gt;The golden rule is: if the step doesn&amp;#39;t show up, it&amp;#39;s not supporting metadata injection yet&lt;/i&gt;&amp;quot;.&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;We will be looking at an extremely simple example (&lt;i&gt;tr_metadata_injection_main.ktr&lt;/i&gt;):&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;Image in we have a dataset which looks like this one:&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;div id="bou-" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_267dn3czqgh_b" style="height:111px;width:306px"&gt;&lt;/div&gt;Our ETL process should pivot this data in this way:&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;div id="pqcc" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_268f8bdn7dd_b" style="height:110px;width:289px"&gt;&lt;/div&gt;Now if our original dataset contains only a static number of product names (in our case: &lt;i&gt;electronics&lt;/i&gt;, &lt;i&gt;consulting&lt;/i&gt;), then we can easily set up a predefined ETL process. But what if the number of product names might change in future?&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;So far we only had the option to amend our ETL process manually, which means we had to edit our Kettle transformation and add the new name(s) to the &lt;b&gt;Row denormalizer&lt;/b&gt;&amp;nbsp;step. This was rather inconvenient as ideally this should have been picked up automatically. The great news is, that now this is possible with the &lt;b&gt;ETL Metadata Injection&lt;/b&gt;&amp;nbsp;step.&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;Create following table on your &lt;b&gt;database&lt;/b&gt; of choice (amend if necessary):&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;" size="2"&gt;USE&lt;/font&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;" size="2"&gt;test&lt;/font&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;" size="2"&gt;;&lt;/font&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;font size="2"&gt;&lt;br&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;" size="2"&gt;CREATE TABLE&lt;/font&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;" size="2"&gt;product_sales&lt;/font&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;" size="2"&gt;(&lt;/font&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;" size="2"&gt;city VARCHAR(20),&lt;/font&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;" size="2"&gt;continent VARCHAR(20),&lt;/font&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;" size="2"&gt;product VARCHAR(20),&lt;/font&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;" size="2"&gt;sales INT(255)&lt;/font&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;" size="2"&gt;)&lt;/font&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;" size="2"&gt;engine=innodb&lt;/font&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;" size="2"&gt;;&lt;/font&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;font size="2"&gt;&lt;br&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;" size="2"&gt;INSERT INTO&amp;nbsp;&lt;/font&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;" size="2"&gt;product_sales&lt;/font&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;" size="2"&gt;VALUES&lt;/font&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;" size="2"&gt;(&amp;quot;city1&amp;quot;,&amp;quot;Europe&amp;quot;,&amp;quot;electronics&amp;quot;,1234),&lt;/font&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;" size="2"&gt;(&amp;quot;city2&amp;quot;,&amp;quot;Africa&amp;quot;,&amp;quot;consulting&amp;quot;,1242),&lt;/font&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;" size="2"&gt;(&amp;quot;city3&amp;quot;,&amp;quot;Asia&amp;quot;,&amp;quot;electronics&amp;quot;,23412),&lt;/font&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;" size="2"&gt;(&amp;quot;city4&amp;quot;,&amp;quot;South America&amp;quot;,&amp;quot;electronics&amp;quot;,342),&lt;/font&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;" size="2"&gt;(&amp;quot;city5&amp;quot;,&amp;quot;North America&amp;quot;,&amp;quot;consulting&amp;quot;,1243),&lt;/font&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;" size="2"&gt;(&amp;quot;city6&amp;quot;,&amp;quot;Europe&amp;quot;,&amp;quot;consulting&amp;quot;,45432),&lt;/font&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;" size="2"&gt;(&amp;quot;city7&amp;quot;,&amp;quot;Asia&amp;quot;,&amp;quot;electronics&amp;quot;,4332)&lt;/font&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;" size="2"&gt;;&lt;/font&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;Now let&amp;#39;s create our &lt;b&gt;transformation&lt;/b&gt; based on the screenshot below:&lt;/div&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;div id="i-ci" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_273rt4zgmht_b" style="height:503.9063719115735px;width:648px"&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;This transformation will query data from the table we just created. The &lt;b&gt;Select values&lt;/b&gt;&amp;nbsp;step allows use to keep only the required fields (It&amp;#39;s not really useful in this example, but mainly here for demonstration purposes). Next the data goes into the &lt;b&gt;Row denormalizer&lt;/b&gt;&amp;nbsp;step, which basically pivots our data.&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;To test this transformation I suggest adding a &lt;b&gt;Text file output&lt;/b&gt;&amp;nbsp;step and filling out all the required settings in all the steps. Once this works, change the settings of the relevant steps and hops so that they look like the ones shown in the screenshot above. As you can see, we leave the &lt;b&gt;Select values&lt;/b&gt;&amp;nbsp;step completely unconfigured and for the &lt;b&gt;Row denormalizer&lt;/b&gt;&amp;nbsp;step we only define the &lt;b&gt;Key&lt;/b&gt;&amp;nbsp;and&amp;nbsp;&lt;b&gt;Group by&lt;/b&gt;&amp;nbsp;fields. Everything else we will configure by using the &lt;b&gt;ETL&lt;/b&gt;&amp;nbsp;&lt;b&gt;Metadata Injection&lt;/b&gt;&amp;nbsp;step.&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;We create a &lt;b&gt;second transformation&lt;/b&gt; (&lt;i&gt;tr_metadata_injection_config.ktr&lt;/i&gt;) to supply the metadata to our main transformation:&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;div id="uk3r" style="text-align:left"&gt;&lt;div id="gxkt" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_269gb5gq3cg_b" style="height:504.96px;width:648px"&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;div id="yz_." style="text-align:left"&gt;First off we have to get the unique product names in order to pivot the data correctly. We use a &lt;b&gt;Table input&lt;/b&gt;&lt;i&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/i&gt;step therefore with following query:&lt;/div&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;"&gt;SELECT&lt;/font&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;"&gt;DISTINCT(product) AS product&lt;/font&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;"&gt;FROM&lt;/font&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;"&gt;product_sales&lt;/font&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;"&gt;;&lt;/font&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;For this stream we also add some additional fields to have all the metadata complete for injection to the &lt;b&gt;Row denormalizer&lt;/b&gt;&amp;nbsp;step in our original transformation.&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;We also use a &lt;b&gt;Data Grid&lt;/b&gt;&amp;nbsp;step to define the fields that we want to keep for the &lt;b&gt;Select values&lt;/b&gt;&amp;nbsp;step in our original transformation.&amp;nbsp;&lt;/div&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;Now we can map our metadata with the steps of our original transformation:&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;ol&gt;&lt;li&gt;Double click on the&amp;nbsp;&lt;b&gt;ETL Metadata Injection&lt;/b&gt;&amp;nbsp;step and the settings dialog will pop up.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Click the &lt;b&gt;Browse&lt;/b&gt;&amp;nbsp;button to choose which transformation you want to inject metadata to.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Click &lt;b&gt;Ok&lt;/b&gt;, then double click again on the&amp;nbsp;&lt;b&gt;ETL Metadata Injection &lt;/b&gt;step and you will see a tree-like representation of your main transformation. For each step you see all the settings that can be used by the metadata injection. You do not have to provide all of them though, but definitely the essential ones. If you are unsure as to what the essential once are, then just create a separate testing transformation and test which settings are necessary for a certain step to work properly.&lt;/li&gt;&lt;li&gt;For the settings that you want to provide metadata for, click on the &lt;b&gt;Source step &lt;/b&gt;field in the respective row and a dialog will guide you through the mapping:&lt;br&gt;&lt;div id="avro" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_271c7x9cd22_b" style="height:586.0645161290323px;width:648px"&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;As we want to use the output of our original transformation in this current transformation, we also define the &lt;b&gt;Row denormalizer&lt;/b&gt;&amp;nbsp;step as &lt;b&gt;Source step to read from (optional)&lt;/b&gt;.&lt;/li&gt;&lt;/ol&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;The last step &lt;b&gt;Results &lt;/b&gt;(Add constant values step) is a hack: Currently there is no way to pass on the dynamic results of the &lt;b&gt;ETL metadata injection&lt;/b&gt;&amp;nbsp;to &lt;b&gt;PRD&lt;/b&gt;. By using the &lt;b&gt;Add constant values&lt;/b&gt;&amp;nbsp;step, we can define the fields and field types that we expect to be return from the metadata injected transformation. In our case it will look like this:&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;div id="ke0z" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_272g4vkwmgw_b" style="height:260px;width:421px"&gt;&lt;/div&gt;At runtime the &lt;b&gt;ETL metadata injection&lt;/b&gt;&amp;nbsp;step will output fields of the same name and pass them to the &lt;b&gt;Add constant values&lt;/b&gt;&amp;nbsp;step. As this last step adds field that already exist in the input stream, these field names will be automatically to _1 since they are duplicates.&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;br class="Apple-interchange-newline"&gt;&lt;table bgcolor="#eeeeee" border="1" bordercolor="#999999" cellpadding="3" cellspacing="0" width="100%"&gt;&lt;tbody&gt;&lt;tr style="text-align:left"&gt;&lt;td width="100%"&gt;&lt;b style="color:#cc0000"&gt;&lt;font size="3"&gt;Note:&lt;/font&gt;&lt;/b&gt;&lt;font size="3"&gt;&amp;nbsp;You&lt;/font&gt;&lt;font face="verdana"&gt;&lt;font size="3"&gt;&amp;nbsp;execute the original transformation by running the metadata transformation. So in our example, you would run &lt;/font&gt;&lt;i&gt;&lt;font size="3"&gt;tr_metadata_injection_config.ktr&lt;/font&gt;&lt;/i&gt;&lt;font size="3"&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;So let&amp;#39;s test our setup: Mark the &lt;b&gt;Result&lt;/b&gt;&amp;nbsp;(Add constant values) step in &lt;i&gt;tr_metadata_injection_config.ktr&lt;/i&gt; and click the &lt;b&gt;Preview&lt;/b&gt;&amp;nbsp;button. The output will look like this:&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;div id="hu7i" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_274dcq67hq5_b" style="height:207.5744680851064px;width:648px"&gt;&amp;nbsp;&lt;/div&gt;&lt;h3&gt;&lt;a id="PDI_Data_Source_in_Pentaho_Rep" name="PDI_Data_Source_in_Pentaho_Rep"&gt;&lt;/a&gt;&lt;font size="3"&gt;&lt;b&gt;PDI Data Source in Pentaho Report Designer&lt;/b&gt;&lt;/font&gt;&lt;/h3&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;Now that our metadata driven ETL process is running successfully, the next step is to use this data directly for the report output. In Pentaho Report Designer we can define a PDI transformation as a data source:&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;ol&gt;&lt;li&gt;Open &lt;b&gt;Pentaho Report Designer&lt;/b&gt;&lt;/li&gt;&lt;li&gt;Create a new report&lt;/li&gt;&lt;li&gt;Click on the &lt;b&gt;Data &lt;/b&gt;tab&lt;/li&gt;&lt;li&gt;Right click on &lt;b&gt;Data Source&lt;/b&gt;&amp;nbsp;and choose &lt;b&gt;Pentaho Data Integration&lt;br&gt;&lt;/b&gt;&lt;div id="dbgh" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_265c8wcr7cq_b" style="height:304px;width:291px"&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;In the dialog click on the (+) button to specify a new &lt;b&gt;query&lt;/b&gt;&lt;/li&gt;&lt;li&gt;Click on &lt;b&gt;Browse &lt;/b&gt;to find the metadata configuration transformation we just created&lt;/li&gt;&lt;li&gt;Mark the &lt;b&gt;Result &lt;/b&gt;step and click &lt;b&gt;Preview&lt;br&gt;&lt;/b&gt;&lt;div id="itr:" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_275f3h6tvgq_b" style="height:457.16230366492147px;width:648px"&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;Click &lt;b&gt;Close&lt;/b&gt;&amp;nbsp;followed by&amp;nbsp;&lt;b&gt;OK&lt;/b&gt;&lt;/li&gt;&lt;li&gt;Define the &lt;b&gt;report-preprocessor&lt;/b&gt; and wizard as described in the &lt;a href="#Defining_the_report_pre_proces_4776478579733521" id="fy3v" target="_self" title="Defining the report pre-processor"&gt;Defining the report pre-processor&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Design&lt;/b&gt; the report as described in &lt;a href="#Designing_the_report_326501507" id="mcpi" target="_self" title="Designing the report"&gt;Designing the report&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Preview &lt;/b&gt;the report. It should now look something like this:&lt;br&gt;&lt;div id="ihsu" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_276sdzf5cv_b" style="height:110.1416430594901px;width:648px"&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br&gt;&lt;h3&gt;&lt;a id="Room_for_improvement_390104996_9739320673979819" name="Room_for_improvement_390104996_9739320673979819"&gt;&lt;/a&gt;Room for improvement&lt;/h3&gt;&lt;div&gt;As you can see, the only problem currently is that there is no way to pass the dynamic Kettle dataset to PRD - that is why we had to use a work-around. If a new product name shows up, we still have to change the &lt;b&gt;Result&lt;/b&gt;&amp;nbsp;(Add constant values) step in our example. Now imagine the possibilites if a future version of PRD would accept dynamic Kettle datasets: In our example we would not have to change anything. The new product name would automatically be passed on to the report output.&lt;/div&gt;&lt;br&gt;&lt;div&gt;Let&amp;#39;s add a new product name to our table (use your favourite &lt;b&gt;SQL client&lt;/b&gt;):&lt;/div&gt;&lt;div id="jf6m" style="text-align:left"&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;" size="2"&gt;INSERT INTO&amp;nbsp;&lt;/font&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;" size="2"&gt;product_sales&lt;/font&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;" size="2"&gt;VALUES&lt;/font&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;" size="2"&gt;(&amp;quot;city1&amp;quot;,&amp;quot;Europe&amp;quot;,&amp;quot;photography&amp;quot;,342)&lt;/font&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;" size="2"&gt;;&lt;/font&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;font size="2"&gt;&lt;br&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;font size="2"&gt;In Kettle (&lt;b&gt;Spoon&lt;/b&gt;), mark the &lt;b&gt;ETL Metadata Injection&lt;/b&gt;&amp;nbsp;step and click on &lt;b&gt;Preview&lt;/b&gt;. You will see that our new product name was automatically added to the result set:&lt;/font&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;div id="wikt" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_277cx4j4qg4_b" style="height:273px;width:572px"&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;font size="2"&gt;The problem now is that we have to manually at this new field name to the &lt;b&gt;Result&lt;/b&gt;&amp;nbsp;(Add constant values) step in order for PRD to be able to read it.&lt;/font&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;&lt;div&gt;The main improvement should happen in &lt;b&gt;PRD&lt;/b&gt; to allow dynamic PDI input. &lt;b&gt;PRD&lt;/b&gt; already allows dynamic input for most other data source, so adding this feature for PDI data sources should not be a lot of work.&lt;/div&gt;&lt;/div&gt;&lt;h2&gt;&lt;a id="Working_with_fixed_width_MDX_o" name="Working_with_fixed_width_MDX_o"&gt;&lt;/a&gt;&lt;font size="4"&gt;&lt;b&gt;Working with fixed width MDX output in Pentaho Report Designer&lt;/b&gt;&lt;/font&gt;&lt;/h2&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;div&gt;&lt;p&gt;We will now have a look at how to easily work with a fixed width MDX result set in Pentaho Report Designer. As mentioned before, sometimes you might have a result set with changing column names. Imagine we have a daily summary for the last 10 days. Each column name has the actual date. Now if I run the same query tomorrow, the column names will have changed. &lt;b&gt;PRD &lt;/b&gt;has a feature called &lt;b&gt;index column&lt;/b&gt;: So instead of referring to the column names, it allows you to refer to the column position.&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;For this example here I will reuse an existing &lt;b&gt;PRD&lt;/b&gt;&amp;nbsp;example query so that everyone can follow easily:&lt;/p&gt;&lt;h3&gt;&lt;a id="Changing_the_Report_Designer_s_8067882657051086" name="Changing_the_Report_Designer_s_8067882657051086"&gt;&lt;/a&gt;&lt;font size="3"&gt;Changing the Report Designer settings&lt;/font&gt;&lt;/h3&gt;Before we can get started, we have to enable a special setting. Open up the&amp;nbsp;&lt;b&gt;Pentaho Report Designer&lt;/b&gt;&amp;nbsp;and go to&amp;nbsp;&lt;b&gt;Edit &amp;gt; Settings &amp;gt; General&lt;/b&gt;&amp;nbsp;and enable&amp;nbsp;&lt;b&gt;Display the index columns in the Report-Designer&amp;rsquo;s field selectors&lt;/b&gt;:&lt;/div&gt;&lt;div id="dn_y" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_261d2p5m5gn_b" style="height:408.30379746835445px;width:648px"&gt;&lt;/div&gt;&lt;br&gt;&lt;h3&gt;&lt;a id="Defining_a_query_9946864454541_3540988080203533" name="Defining_a_query_9946864454541_3540988080203533"&gt;&lt;/a&gt;Defining a query&lt;/h3&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;ol&gt;&lt;li&gt;Create a new report&lt;/li&gt;&lt;li&gt;Click on the&amp;nbsp;&lt;b&gt;Data&amp;nbsp;&lt;/b&gt;tab&lt;/li&gt;&lt;li&gt;Right click on&amp;nbsp;&lt;b&gt;Data Source&lt;/b&gt;&amp;nbsp;and choose&amp;nbsp;&lt;b&gt;OLAP &amp;gt; Pentaho Analysis&lt;br&gt;&lt;/b&gt;&lt;div id="z6rn" style="text-align:left"&gt;&lt;div id="yedi" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_280gj3spsnp_b" style="height:211px;width:571px"&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;Define the OLAP schema file:&amp;nbsp;&lt;i&gt;steelwheels.mondrian.xml&lt;/i&gt;. This file should be in the same location as this report.&lt;/li&gt;&lt;li&gt;Mark following database on the left hand side:&amp;nbsp;&lt;i&gt;SampleData&lt;/i&gt;. This database comes with PRD, so you don&amp;#39;t have to worry about anything here.&lt;/li&gt;&lt;li&gt;In the dialog click on the (+) button to specify a new&amp;nbsp;&lt;b&gt;query&amp;nbsp;&lt;/b&gt;(copy the query shown after this numbered list).&lt;/li&gt;&lt;li&gt;Click&amp;nbsp;&lt;b&gt;Preview&lt;br&gt;&lt;/b&gt;&lt;div id="uhl_" style="text-align:left"&gt;&lt;div id="jhza" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_281gwn4zhf5_b" style="height:463.3005988023952px;width:648px"&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;Click &lt;b&gt;Close&lt;/b&gt;&amp;nbsp;followed by&amp;nbsp;&lt;b&gt;OK&lt;/b&gt;&lt;/li&gt;&lt;li&gt;Notice that apart from the standard fields the &lt;b&gt;index fields &lt;/b&gt;are shown as well in the &lt;b&gt;Data Sets&lt;/b&gt;&amp;nbsp;overview:&lt;br&gt;&lt;div id="xnln" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_282d6rm356f_b" style="height:211px;width:378px"&gt;&lt;/div&gt;&lt;div id="pxt:" style="text-align:left"&gt;Now we can just drag and drop these&amp;nbsp;&lt;b&gt;index fields&lt;/b&gt;&amp;nbsp;on the canvas as we would do with standard fields.&lt;/div&gt;&lt;/li&gt;&lt;li&gt;Drag and drop the index fields in the &lt;b&gt;details band&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;Do exactly the same for the details header. Mark all of the details header fields and choose &lt;b&gt;Format &amp;gt; Morph &amp;gt; label&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Mark&lt;/b&gt;&amp;nbsp;all the index fields (in the details band and in the details header) in the &lt;b&gt;Structure&lt;/b&gt;&amp;nbsp;tree using CTRL, go to the &lt;b&gt;Attributes&lt;/b&gt;&amp;nbsp;tab and enable following attributes for &lt;b&gt;query-metadata&lt;/b&gt;:&lt;br&gt;&lt;i&gt;data-format&lt;/i&gt;: true&lt;br&gt;&lt;i&gt;style-format&lt;/i&gt;: true&lt;/li&gt;&lt;li&gt;For each index field in the &lt;b&gt;details header&lt;/b&gt;, set the &lt;b&gt;labels-detail-header&lt;/b&gt;&amp;nbsp;attribute respectively (i.e.: ::column::0)&lt;/li&gt;&lt;li&gt;If you wish, apply additional formats to the report&lt;/li&gt;&lt;li&gt;&lt;b&gt;Preview&amp;nbsp;&lt;/b&gt;the report. It should now look something like this:&lt;br&gt;&lt;div id="xpx6" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_279cwvxpgfc_b" style="height:68.0672268907563px;width:648px"&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br&gt;&lt;div&gt;MDX to copy (this query actually comes with one of the PRD examples):&lt;/div&gt;&lt;div&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;"&gt;with&amp;nbsp;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;"&gt;&amp;nbsp; set [TopSelection] as&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;"&gt;&amp;nbsp; &amp;#39;TopCount(FILTER([Customers].[All Customers].Children,[Measures].[Sales]&amp;gt;0), Parameter(&amp;quot;TopCount&amp;quot;, NUMERIC, 10, &amp;quot;Number of Customers to show&amp;quot;), [Measures].[Sales])&amp;#39;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;"&gt;&amp;nbsp; Member [Customers].[All Customers].[Total] as &amp;#39;Sum([TopSelection])&amp;#39;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;"&gt;&amp;nbsp; Member [Customers].[All Customers].[Other Customers] as &amp;#39;[Customers].[All Customers] - [Customers].[Total]&amp;#39;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;"&gt;select NON EMPTY {[Measures].[Sales],[Measures].[Quantity] } ON COLUMNS,&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;"&gt;&amp;nbsp; { [TopSelection], [Customers].[All Customers].[Other Customers]} ON ROWS&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;"&gt;from [SteelWheelsSales]&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;"&gt;where&amp;nbsp;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;"&gt;(&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;"&gt;strToMember(Parameter(&amp;quot;sLine&amp;quot;, STRING, &amp;quot;[Product].[All Products].[Classic Cars]&amp;quot;)),&amp;nbsp;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;"&gt;strToMember(Parameter(&amp;quot;sMarket&amp;quot;, STRING, &amp;quot;[Markets].[All Markets].[Japan]&amp;quot;)),&amp;nbsp;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;"&gt;strToMember(Parameter(&amp;quot;sYear&amp;quot;, STRING, &amp;quot;[Time].[All Years].[2003]&amp;quot;))&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;"&gt;)&lt;/font&gt;&lt;/div&gt;&lt;br&gt;As we don&amp;#39;t know the field values upfront, we also have to make sure that extremely long values can be handled gracefully. This is out of scope of this article.&lt;br&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;h2&gt;&lt;a id="Working_with_dynamic_MDX_outpu" name="Working_with_dynamic_MDX_outpu"&gt;&lt;/a&gt;&lt;font size="4"&gt;Working with dynamic MDX output in Pentaho Report Designer&lt;/font&gt;&lt;/h2&gt;&lt;/div&gt;Now we want to actually go a step further and use dynamic MDX results. For this scenario we will not make use of index fields, but follow the same approach as before with the PDI data source. We use exactly the same query again, but theoretically you could now use any MDX query:&amp;nbsp;&lt;br&gt;&lt;ol&gt;&lt;li&gt;Open&amp;nbsp;&lt;b&gt;Pentaho Report Designer&lt;/b&gt;&lt;/li&gt;&lt;li&gt;Create a new report&lt;/li&gt;&lt;li&gt;Click on the&amp;nbsp;&lt;b&gt;Data&amp;nbsp;&lt;/b&gt;tab&lt;/li&gt;&lt;li&gt;Right click on&amp;nbsp;&lt;b&gt;Data Source&lt;/b&gt;&amp;nbsp;and choose&amp;nbsp;&lt;b&gt;OLAP &amp;gt; Pentaho Analysis&lt;br&gt;&lt;/b&gt;&lt;div id="gsge" style="text-align:left"&gt;&lt;div id="ywjr" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_280gj3spsnp_b" style="height:211px;width:571px"&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;Define the OLAP schema file: &lt;i&gt;steelwheels.mondrian.xml&lt;/i&gt;. This file should be in the same location as this report.&lt;/li&gt;&lt;li&gt;Mark following database on the left hand side: &lt;i&gt;SampleData&lt;/i&gt;. This database comes with PRD, so you don&amp;#39;t have to worry about anything here.&lt;/li&gt;&lt;li&gt;In the dialog click on the (+) button to specify a new&amp;nbsp;&lt;b&gt;query &lt;/b&gt;(copy the query shown after this numbered list).&lt;/li&gt;&lt;li&gt;Click&amp;nbsp;&lt;b&gt;Preview&lt;br&gt;&lt;/b&gt;&lt;div id="a25h" style="text-align:left"&gt;&lt;div id="lq9i" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_281gwn4zhf5_b" style="height:463.3005988023952px;width:648px"&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;Click &lt;b&gt;Close&lt;/b&gt;&amp;nbsp;followed by&amp;nbsp;&lt;b&gt;OK&lt;/b&gt;&lt;/li&gt;&lt;li&gt;Define the&amp;nbsp;&lt;b&gt;report-preprocessor&lt;/b&gt;&amp;nbsp;and wizard as described in the&amp;nbsp;&lt;a href="#Defining_the_report_pre_proces_4776478579733521" id="oynf" target="_self" title="Defining the report pre-processor"&gt;Defining the report pre-processor&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Design&lt;/b&gt;&amp;nbsp;the report as described in&amp;nbsp;&lt;a href="#Designing_the_report_326501507" id="ynhj" target="_self" title="Designing the report"&gt;Designing the report&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Preview&amp;nbsp;&lt;/b&gt;the report. It should now look something like this:&lt;br&gt;&lt;div id="a_gd" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_279cwvxpgfc_b" style="height:68.0672268907563px;width:648px"&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br&gt;&lt;div&gt;MDX to copy (this query actually comes with one of the PRD examples):&lt;/div&gt;&lt;div&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;"&gt;with&amp;nbsp;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;"&gt;&amp;nbsp; set [TopSelection] as&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;"&gt;&amp;nbsp; &amp;#39;TopCount(FILTER([Customers].[All Customers].Children,[Measures].[Sales]&amp;gt;0), Parameter(&amp;quot;TopCount&amp;quot;, NUMERIC, 10, &amp;quot;Number of Customers to show&amp;quot;), [Measures].[Sales])&amp;#39;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;"&gt;&amp;nbsp; Member [Customers].[All Customers].[Total] as &amp;#39;Sum([TopSelection])&amp;#39;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;"&gt;&amp;nbsp; Member [Customers].[All Customers].[Other Customers] as &amp;#39;[Customers].[All Customers] - [Customers].[Total]&amp;#39;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;"&gt;select NON EMPTY {[Measures].[Sales],[Measures].[Quantity] } ON COLUMNS,&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;"&gt;&amp;nbsp; { [TopSelection], [Customers].[All Customers].[Other Customers]} ON ROWS&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;"&gt;from [SteelWheelsSales]&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;"&gt;where&amp;nbsp;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;"&gt;(&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;"&gt;strToMember(Parameter(&amp;quot;sLine&amp;quot;, STRING, &amp;quot;[Product].[All Products].[Classic Cars]&amp;quot;)),&amp;nbsp;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;"&gt;strToMember(Parameter(&amp;quot;sMarket&amp;quot;, STRING, &amp;quot;[Markets].[All Markets].[Japan]&amp;quot;)),&amp;nbsp;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;"&gt;strToMember(Parameter(&amp;quot;sYear&amp;quot;, STRING, &amp;quot;[Time].[All Years].[2003]&amp;quot;))&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;"&gt;)&lt;/font&gt;&lt;/div&gt;&lt;br&gt;The disadvantage of this approach is that the column headers are not particular nice to read ... but there might be a way to control this.&lt;br&gt;&lt;h2&gt;&lt;a id="Conclusion" name="Conclusion"&gt;&lt;/a&gt;Conclusion&lt;/h2&gt;Exploring these advanced features of &lt;b&gt;Pentaho Data Integration&lt;/b&gt;&amp;nbsp;and &lt;b&gt;Report Designer&lt;/b&gt;&amp;nbsp;has been an extremely interesting journey. There are many more features available which couldn&amp;#39;t be covered in this tutorial. I suggest that you take this information here as a starting point and explore all the possibilities if you have time.&lt;br&gt;&lt;div&gt;Overall, if the next version of &lt;b&gt;PRD&lt;/b&gt;&amp;nbsp;brings dynamic &lt;b&gt;PDI&lt;/b&gt;&amp;nbsp;data source support, there will a huge potential available. Over the time, &lt;b&gt;PDI&lt;/b&gt;&amp;nbsp;will also add additional &lt;b&gt;ETL&lt;/b&gt;&amp;nbsp;steps for &lt;b&gt;metadata injection&lt;/b&gt;&amp;nbsp;and then our journey will even get more exciting!&lt;/div&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4527276399966185267-478393566338275941?l=diethardsteiner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://diethardsteiner.blogspot.com/feeds/478393566338275941/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://diethardsteiner.blogspot.com/2011/07/metadata-driven-etl-and-reporting.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4527276399966185267/posts/default/478393566338275941'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4527276399966185267/posts/default/478393566338275941'/><link rel='alternate' type='text/html' href='http://diethardsteiner.blogspot.com/2011/07/metadata-driven-etl-and-reporting.html' title='Metadata Driven ETL and Reporting'/><author><name>Diethard Steiner</name><uri>https://profiles.google.com/101564429460248850938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4527276399966185267.post-1448536158680898333</id><published>2011-06-28T03:03:00.000-07:00</published><updated>2011-06-28T03:03:55.935-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Pentaho Data Integration 4 Cookbook'/><title type='text'>Pentaho Data Integration 4 Cookbook</title><content type='html'>A new book on Pentaho Data Integration is out: &lt;a href="http://link.packtpub.com/avTKhf"&gt;Pentaho Data Integration 4 Cookbook&lt;/a&gt;! I just received a review sample and I'll be posting a full review in the next few weeks.&lt;br /&gt;Jump over to &lt;a href="http://link.packtpub.com/avTKhf"&gt;PacktPub&lt;/a&gt; to see the full details ...&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://www.packtpub.com/sites/default/files/5245OS_Pentaho%20Data%20Integration%204%20Cookbook.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://www.packtpub.com/sites/default/files/5245OS_Pentaho%20Data%20Integration%204%20Cookbook.jpg" width="256" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4527276399966185267-1448536158680898333?l=diethardsteiner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://diethardsteiner.blogspot.com/feeds/1448536158680898333/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://diethardsteiner.blogspot.com/2011/06/pentaho-data-integration-4-cookbook.html#comment-form' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4527276399966185267/posts/default/1448536158680898333'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4527276399966185267/posts/default/1448536158680898333'/><link rel='alternate' type='text/html' href='http://diethardsteiner.blogspot.com/2011/06/pentaho-data-integration-4-cookbook.html' title='Pentaho Data Integration 4 Cookbook'/><author><name>Diethard Steiner</name><uri>https://profiles.google.com/101564429460248850938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4527276399966185267.post-3554852945098435008</id><published>2011-05-29T12:18:00.001-07:00</published><updated>2011-05-29T12:20:25.001-07:00</updated><title type='text'>Pentaho Report Designer: Creating a Bar-Line chart with secondary</title><content type='html'>&lt;font size="5"&gt;&lt;b&gt;Pentaho Report Designer: Creating a Bar-Line Chart with Secondary Axis in Different Format&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br&gt;&lt;b&gt;Tutorial Details&lt;/b&gt;&lt;br&gt;&lt;ul&gt;&lt;li&gt;Software: PRD 3.8 (download&amp;nbsp;&lt;a href="http://sourceforge.net/projects/pentaho/files/" id="nlz4" title="here"&gt;here&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;Knowledge: Intermediate (To follow this tutorial you should have good knowledge of the software and hence not every single step will be described)&lt;/li&gt;&lt;li&gt;Tutorial files can be downloaded&amp;nbsp;&lt;a href="http://docs.google.com/leaf?id=0B-yuO-Oixq4RZjA2ZTMwMjUtZTNjYy00NzczLTg1OGUtMDMzOGZkZjNhOWQ1&amp;amp;hl=en_GB" id="lygl" title="here"&gt;here&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br&gt;&lt;div&gt;Pentaho Report Designer offers a wider variety of chart types. Today we will look at the bar-line chart type. We will create a secondary axis and apply a different format on it. Our final chart will look like this one below (This is a chart created in 2 minutes, if you spend 2 minutes more, it will even look better):&lt;br&gt;&lt;div id="gasv" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_252dhsd85gv_b" style="height:251px;width:287px"&gt;&lt;/div&gt;&lt;div&gt;I will not explain everything step by step but only focus on how to set up a chart which is based on data similar to the one shown below:&lt;/div&gt;&lt;div id="caz1" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_254cq48v3gt_b" style="height:515px;width:296px"&gt;&lt;/div&gt;&lt;br&gt;&lt;div&gt;As you can see, the data set consists of impressions and click thru rate (CTR) broken down by option. In our chart, we want to display the impressions as bars and the CTR as a line. The only complexity that we have here is that CTR should be shown as a percentage whereas the impressions as standard integer values. So how does this work?&lt;/div&gt;&lt;br&gt;&lt;div&gt;The most important point is that although in this case we only have one data set, for the chart we have to define two data sources, as our measures have different formats.&lt;/div&gt;&lt;br&gt;&lt;div&gt;First we will define the settings for the bars (I only mention the very important points here):&lt;/div&gt;&lt;ul&gt;&lt;li&gt;In the&amp;nbsp;&lt;b&gt;Primary DataSource&lt;/b&gt;&amp;nbsp;settings we only define [impressions] in the &lt;b&gt;value-columns&lt;/b&gt;&amp;nbsp;&lt;/li&gt;&lt;li&gt;The format can be defined with the &lt;b&gt;y-tick-fmt-str&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div id="zr6p" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_253grh8f9cf_b" style="height:340.1461794019934px;width:648px"&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;Thereafter, we click on &lt;b&gt;Secondary DataSource&lt;/b&gt;:&lt;/div&gt;&lt;ul&gt;&lt;li&gt;We define [CTR] for the &lt;b&gt;value-columns&lt;/b&gt;&lt;/li&gt;&lt;li&gt;Now we would expect something like y2-tick-fmt-str, but this one strangely enough doesn&amp;#39;t exist. Instead, the format for the line has to be set in &lt;b&gt;line-tick-fmt&lt;/b&gt;:&lt;/li&gt;&lt;/ul&gt;&lt;div id="ylcp" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_251hqbfrqhj_b" style="height:372.1263157894737px;width:648px"&gt;&lt;/div&gt;&lt;br&gt;Provide all the other necessary details in the settings dialog and then the chart should be displayed perfectly.&lt;br&gt;&lt;/div&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4527276399966185267-3554852945098435008?l=diethardsteiner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://diethardsteiner.blogspot.com/feeds/3554852945098435008/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://diethardsteiner.blogspot.com/2011/05/pentaho-report-designer-creating-bar.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4527276399966185267/posts/default/3554852945098435008'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4527276399966185267/posts/default/3554852945098435008'/><link rel='alternate' type='text/html' href='http://diethardsteiner.blogspot.com/2011/05/pentaho-report-designer-creating-bar.html' title='Pentaho Report Designer: Creating a Bar-Line chart with secondary'/><author><name>Diethard Steiner</name><uri>https://profiles.google.com/101564429460248850938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4527276399966185267.post-985502068184950603</id><published>2011-05-26T13:50:00.001-07:00</published><updated>2011-05-26T13:52:42.863-07:00</updated><title type='text'>Kettle: Sourcing data from Hadoop Hive</title><content type='html'>&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;font size="5"&gt;&lt;b&gt;Pentaho Data Integration (Kettle): Sourcing data from Hadoop Hive &lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br&gt;&lt;b&gt;Tutorial Details&lt;br&gt;&lt;/b&gt;&lt;br&gt;&lt;ul&gt;&lt;li&gt;Software: PDI/Kettle 4.1 (download &lt;a href="http://sourceforge.net/projects/pentaho/files/"&gt;here&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;Knowledge: Beginner&lt;/li&gt;&lt;/ul&gt;&lt;br&gt;&lt;br&gt;&lt;font size="2"&gt;Has your company recently started using Hadoop to cope with enormous amounts of data? Have you been using Kettle so far for your ETL? As you are probably aware of, with the Kettle Enterprise Edition you can now create map-reduce jobs for Hadoop. If you want to stay with the open source version, the good news is, that it&amp;rsquo;s very simple to connect to Hive - a database which can be set up on top of Hadoop.&lt;/font&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;font size="2"&gt;&lt;br&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font color="#000000"&gt;If you have one of the latest versions of Kettle installed, you will see that it comes already with the required Hive driver. Hence, setting up a connection to Hive is straight forward.&lt;/font&gt;&lt;/span&gt;&lt;br&gt;&lt;br&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font color="#000000"&gt;&lt;b&gt;Create a new database connection&lt;/b&gt;&lt;/font&gt;&lt;/span&gt;&lt;br&gt;&lt;/font&gt;&lt;ol&gt;&lt;li style="background-color:transparent;color:#000000;font-style:normal;list-style-type:decimal;vertical-align:baseline"&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font color="#000000" size="2"&gt;Create a new transformation&lt;/font&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="background-color:transparent;color:#000000;font-style:normal;list-style-type:decimal;vertical-align:baseline"&gt;&lt;font size="2"&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font color="#000000"&gt;Click the &lt;/font&gt;&lt;/span&gt;&lt;span style="vertical-align:baseline"&gt;&lt;font color="#000000"&gt;&lt;i&gt;View&lt;/i&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font color="#000000"&gt; tab on the right hand side&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/li&gt;&lt;li style="background-color:transparent;color:#000000;font-style:normal;list-style-type:decimal;vertical-align:baseline"&gt;&lt;font size="2"&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font color="#000000"&gt;Right click on &lt;/font&gt;&lt;/span&gt;&lt;span style="vertical-align:baseline"&gt;&lt;font color="#000000"&gt;&lt;i&gt;Database connections&lt;/i&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font color="#000000"&gt; and choose &lt;/font&gt;&lt;/span&gt;&lt;span style="vertical-align:baseline"&gt;&lt;font color="#000000"&gt;&lt;i&gt;New&lt;/i&gt;&lt;/font&gt;&lt;/span&gt;&lt;br class="kix-line-break"&gt;&lt;img height="258px;" src="https://lh5.googleusercontent.com/4mLO86gNWUfp-DYSmP5COzS_TZ2QxBcMGYC0rzWyv0VMixLHwhuG3us0xNnZ660eyxmPMewp56-xogMMqmzCEko6mImF0bLwZNY1h2jn_LOr0ApvRg" width="356px;"&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt;Alternatively, you can also activate the &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="vertical-align:baseline"&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt;&lt;i&gt;Design&lt;/i&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt; tab and drag and drop a &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="vertical-align:baseline"&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt;&lt;i&gt;Table input&lt;/i&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt; step on the canvas, open it and click on &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="vertical-align:baseline"&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt;&lt;i&gt;New&lt;/i&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt; to create a new database connection.&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;br&gt;&lt;br&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt;In the database settings window choose &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="vertical-align:baseline"&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt;&lt;i&gt;Generic database&lt;/i&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt; from the available databases. &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;br&gt;&lt;br&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt;For the connection URL insert the following:&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;br&gt;&lt;br&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d" size="2"&gt;jdbc:hive://youramazonec2url:10000&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;br&gt;&lt;br&gt;For the driver specify:&lt;br&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;span style="vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d" size="2"&gt;org.apache.hadoop.hive.jdbc.HiveDriver&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;Depending on your setup you might have to provide other details as well.&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;div id="xqic" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_245g2t3rjg8_b" style="height:432px;width:648px"&gt;&lt;/div&gt;&lt;div id="invn" style="text-align:left"&gt;&lt;font size="2"&gt;&lt;span style="vertical-align:baseline"&gt;&lt;font color="#000000"&gt;Click &lt;/font&gt;&lt;/span&gt;&lt;span style="vertical-align:baseline"&gt;&lt;font color="#000000"&gt;&lt;i&gt;Test&lt;/i&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font color="#000000"&gt; and all should be working now.&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;font size="2"&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font color="#000000"&gt;If you want to use any specific settings or user defined functions (&lt;b&gt;UDF&lt;/b&gt;), then you can call them as follows:&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;ol&gt;&lt;li style="background-color:transparent;color:#000000;font-style:normal;list-style-type:decimal;vertical-align:baseline"&gt;&lt;font size="2"&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font color="#000000"&gt;In the database settings window, click on &lt;/font&gt;&lt;/span&gt;&lt;span style="vertical-align:baseline"&gt;&lt;font color="#000000"&gt;&lt;i&gt;Advanced&lt;/i&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font color="#000000"&gt; in the left hand pane.&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/li&gt;&lt;li style="background-color:transparent;color:#000000;font-style:normal;list-style-type:decimal;vertical-align:baseline"&gt;&lt;font size="2"&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font color="#000000"&gt;Insert these statements in the field entitled &lt;/font&gt;&lt;/span&gt;&lt;span style="vertical-align:baseline"&gt;&lt;font color="#000000"&gt;&lt;i&gt;Enter the SQL statements (separated by ;) to exectue right after connecting&lt;/i&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/li&gt;&lt;li style="background-color:transparent;color:#000000;font-style:normal;list-style-type:decimal;vertical-align:baseline"&gt;&lt;font size="2"&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font color="#000000"&gt;Click &lt;/font&gt;&lt;/span&gt;&lt;span style="vertical-align:baseline"&gt;&lt;font color="#000000"&gt;&lt;i&gt;Test &lt;/i&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font color="#000000"&gt;again to check if a connection can be created with these specific settings&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div id="e_l1" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_246fs5f9k5k_b" style="height:430.70658682634735px;width:648px"&gt;&lt;/div&gt;&lt;br&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font color="#000000" size="2"&gt;Everything is set up now for querying Hive from Kettle. Enjoy!&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4527276399966185267-985502068184950603?l=diethardsteiner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://diethardsteiner.blogspot.com/feeds/985502068184950603/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://diethardsteiner.blogspot.com/2011/05/kettle-sourcing-data-from-hadoop-hive.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4527276399966185267/posts/default/985502068184950603'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4527276399966185267/posts/default/985502068184950603'/><link rel='alternate' type='text/html' href='http://diethardsteiner.blogspot.com/2011/05/kettle-sourcing-data-from-hadoop-hive.html' title='Kettle: Sourcing data from Hadoop Hive'/><author><name>Diethard Steiner</name><uri>https://profiles.google.com/101564429460248850938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4527276399966185267.post-8781032733207742893</id><published>2011-05-23T06:39:00.001-07:00</published><updated>2011-05-23T07:37:50.229-07:00</updated><title type='text'>Tutorial Aggregated Tables for Mondrian (Web)</title><content type='html'>&lt;div style="background-color:transparent;font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;span id="internal-source-marker_0.7040921980515122" style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#ff9900"&gt;&lt;b&gt;&lt;font size="6"&gt;Tutorial Aggregated Tables for Mondrian&lt;/font&gt;&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;(Republished Tutorial - originally published July 2009)&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color:transparent;font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="2"&gt;&lt;br&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style="background-color:transparent;font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;For better readability please open this article as Google Document &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;a href="http://docs.google.com/a//document/pub?id=1G-x_-RIPJxw8mCswxE4Uqh0WT4Ef_A8uwwJwQSP9fOs" title="here"&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#0000ee"&gt;&lt;u&gt;&lt;font size="2"&gt;here&lt;/font&gt;&lt;/u&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color:transparent"&gt;&lt;div class="writely-toc" id="WritelyTableOfContents" toctype="none+none"&gt;&lt;ol class="writely-toc-none"&gt;&lt;li&gt;&lt;a href="#Requirements_9993443570565432" target="_self"&gt;Requirements&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="#Know_what_you_are_up_to_3856772459112108" target="_self"&gt;Know what you are up to&lt;/a&gt;&lt;/li&gt;&lt;ol class="writely-toc-none writely-toc-subheading" style="margin-left:0"&gt;&lt;li&gt;&lt;a href="#How_to_enable_MDX_and_SQL_logg_2546932983677834" target="_self"&gt;How to enable MDX and SQL logging on BI Server 3&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="#How_to_configure_Mondrian_to_r_2348242299631238" target="_self"&gt;How to configure Mondrian to recognize aggregated tables&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="#Table_Names_5076158787123859" target="_self"&gt;Table Names&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="#Column_Names_4393553636036813" target="_self"&gt;Column Names&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;li&gt;&lt;a href="#Your_first_aggregated_tables_5618361867964268" target="_self"&gt;Your first aggregated tables&lt;/a&gt;&lt;/li&gt;&lt;ol class="writely-toc-none writely-toc-subheading" style="margin-left:0"&gt;&lt;li&gt;&lt;a href="#Aggregated_table_for_login_cha_5562107663135976" target="_self"&gt;Aggregated table for login channel&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="#Aggregated_table_for_country_6223295337986201" target="_self"&gt;Aggregated table for country&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;li&gt;&lt;a href="#Make_use_of_aggregates_in_othe" target="_self"&gt;Make use of aggregates in other programs&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;font size="2"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;I&amp;#39;ve started using Pentaho BI Suite in early 2009. One of my main objectives was to create a multidimensional model for DSS (Decission Support Systems) and Analysis. As the BI Server already comes with Mondrian, it is fairly easy to start off.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;I created my first cube definition with the Schema Workbench. The cube definition can be saved as an XML file. This XML file you can then export to your solution folder on the BI Server.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;Soon we realized the we will need aggregated tables, as some MDX queries took rather long. I had a look at the Pentaho Aggregation Designer 1.1 and thought that this would be a rather easy task.&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;One thing the Aggregation Designer does is to check if your Schema (the cube definition xml file) is valid, it also checks if your tables are all properly set up, which is indeed a very good functionalilty, as it will show you an errors and you can correct them then.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;I used the Advisor Function within the aggregation designer and created all the recommended tables with the DDL and DML (which the Aggregation Designer creates automatically) and exported the new Cube Schema as well.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;But the problem was, that everything didn&amp;#39;t work. The problem was that I thought that the Aggregation Designer would do everything, but I was quite wrong about that (at the time of the writing Aggregation Designer 1.1 was available), or maybe, I was just doing something wrong. After some unsuccessful approaches I decided to not use the Aggregation Designer, but to create everything from scratch. I am not recommending here that you shouldn&amp;#39;t use the Aggregation Designer, it is definitely worth having a look at it. I am just describing here the approach that worked for me. I am also assuming that you use the standard configuration of Mondrian.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;h3 style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;a id="Requirements_9993443570565432" name="Requirements_9993443570565432"&gt;&lt;/a&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;b&gt;&lt;font size="3"&gt;Requirements&lt;/font&gt;&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/h3&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;This article assumes that you are familiar with&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;ul style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;li style="background-color:transparent;color:#000000;font-family:arial;font-style:normal;list-style-type:disc;vertical-align:baseline"&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;MDX&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="background-color:transparent;color:#000000;font-family:arial;font-style:normal;list-style-type:disc;vertical-align:baseline"&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;MySQL (or SQL in general)&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="background-color:transparent;color:#000000;font-family:arial;font-style:normal;list-style-type:disc;vertical-align:baseline"&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;Pentaho BI Suite&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="background-color:transparent;color:#000000;font-family:arial;font-style:normal;list-style-type:disc;vertical-align:baseline"&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;Pentaho Schema Workbench&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="background-color:transparent;color:#000000;font-family:arial;font-style:normal;list-style-type:disc;vertical-align:baseline"&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;Pentaho Design Studio&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;h3 style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;a id="Know_what_you_are_up_to_3856772459112108" name="Know_what_you_are_up_to_3856772459112108"&gt;&lt;/a&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;b&gt;&lt;font size="3"&gt;Know what you are up to&lt;/font&gt;&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/h3&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;While creating aggregated tables it makes sense to test if they are used for the purpose that you are creating them for. You might have a MDX query that takes quite long to execute and hence you will want to create a dedicated aggregated table therefore. Have a look at the mondrian_sql.log to see which SQL query Mondrian actually creates for your MDX.&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;Your aggregated table will look quite similar to it.&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;When you execute the MDX queries, always have a look at these logs in the beginning, you will learn at lot!&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;h4 style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;a id="How_to_enable_MDX_and_SQL_logg_2546932983677834" name="How_to_enable_MDX_and_SQL_logg_2546932983677834"&gt;&lt;/a&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;b&gt;&lt;font size="2"&gt;How to enable MDX and SQL logging on BI Server 3&lt;/font&gt;&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/h4&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;Whenever an MDX query is executed, Mondrian transforms it into a SQL query. In some cases you want to see what the resulting SQL query is, for example to check if Mondrian is using aggregated tables.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;Go to \tomcat\webapps\pentaho\WEB-INF\classes and change log4j.xml. Just uncomment the last half of the file where it says:&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp; &amp;lt;!-- ========================================================= --&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp; &amp;lt;!-- Special Log File specifically for Mondrian&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; --&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp; &amp;lt;!-- ========================================================= --&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp; &amp;lt;appender name=&amp;quot;MONDRIAN&amp;quot; class=&amp;quot;org.apache.log4j.RollingFileAppender&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;param name=&amp;quot;File&amp;quot; value=&amp;quot;mondrian.log&amp;quot;/&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;param name=&amp;quot;Append&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;param name=&amp;quot;MaxFileSize&amp;quot; value=&amp;quot;500KB&amp;quot;/&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;param name=&amp;quot;MaxBackupIndex&amp;quot; value=&amp;quot;1&amp;quot;/&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;layout class=&amp;quot;org.apache.log4j.PatternLayout&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;param name=&amp;quot;ConversionPattern&amp;quot; value=&amp;quot;%d %-5p [%c] %m%n&amp;quot;/&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/layout&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp; &amp;lt;/appender&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp; &amp;lt;category name=&amp;quot;mondrian&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;priority value=&amp;quot;DEBUG&amp;quot;/&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;appender-ref ref=&amp;quot;MONDRIAN&amp;quot;/&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp; &amp;lt;/category&amp;gt;&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp; &amp;lt;!-- ========================================================= --&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp; &amp;lt;!-- Special Log File specifically for Mondrian MDX Statements --&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp; &amp;lt;!-- ========================================================= --&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp; &amp;lt;appender name=&amp;quot;MDXLOG&amp;quot; class=&amp;quot;org.apache.log4j.RollingFileAppender&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;param name=&amp;quot;File&amp;quot; value=&amp;quot;mondrian_mdx.log&amp;quot;/&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;param name=&amp;quot;Append&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;param name=&amp;quot;MaxFileSize&amp;quot; value=&amp;quot;500KB&amp;quot;/&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;param name=&amp;quot;MaxBackupIndex&amp;quot; value=&amp;quot;1&amp;quot;/&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;layout class=&amp;quot;org.apache.log4j.PatternLayout&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;param name=&amp;quot;ConversionPattern&amp;quot; value=&amp;quot;%d %-5p [%c] %m%n&amp;quot;/&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/layout&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp; &amp;lt;/appender&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp; &amp;lt;category name=&amp;quot;mondrian.mdx&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;priority value=&amp;quot;DEBUG&amp;quot;/&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;appender-ref ref=&amp;quot;MDXLOG&amp;quot;/&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp; &amp;lt;/category&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp; &amp;lt;!-- ========================================================= --&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp; &amp;lt;!-- Special Log File specifically for Mondrian SQL Statements --&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp; &amp;lt;!-- ========================================================= --&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp; &amp;lt;appender name=&amp;quot;SQLLOG&amp;quot; class=&amp;quot;org.apache.log4j.RollingFileAppender&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;param name=&amp;quot;File&amp;quot; value=&amp;quot;mondrian_sql.log&amp;quot;/&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;param name=&amp;quot;Append&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;param name=&amp;quot;MaxFileSize&amp;quot; value=&amp;quot;500KB&amp;quot;/&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;param name=&amp;quot;MaxBackupIndex&amp;quot; value=&amp;quot;1&amp;quot;/&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;layout class=&amp;quot;org.apache.log4j.PatternLayout&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;param name=&amp;quot;ConversionPattern&amp;quot; value=&amp;quot;%d %-5p [%c] %m%n&amp;quot;/&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/layout&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp; &amp;lt;/appender&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp; &amp;lt;category name=&amp;quot;mondrian.sql&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;priority value=&amp;quot;DEBUG&amp;quot;/&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;appender-ref ref=&amp;quot;SQLLOG&amp;quot;/&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp; &amp;lt;/category&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;If you want the SQL to be displayed in a more readable form, add this to the mondrian.properties in pentaho-solutions\system\mondrian (BI Server 3):&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;mondrian.rolap.generate.formatted.sql=true&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;Restart the server, then start one xaction that uses Jpivot/MDX. In Tomcat/bin you will find a mondrian.log, mondrian_sql.log and a mondrian_mdx.log now.&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;h4 style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;a id="How_to_configure_Mondrian_to_r_2348242299631238" name="How_to_configure_Mondrian_to_r_2348242299631238"&gt;&lt;/a&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;b&gt;&lt;font size="2"&gt;How to configure Mondrian to recognize aggregated tables&lt;/font&gt;&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/h4&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;Well, you have to tell Mondrian as well that aggregated tabels exist. The first step is to add following lines to the Mondrian.properties, which you can find on pentaho-solutions\system\mondrian (BI Server 3):&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;mondrian.rolap.aggregates.Use=true&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;mondrian.rolap.aggregates.Read=true&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;Restart the server.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;Furthermore, with the standard setup the table names have to follow a convention (I&amp;#39;ve copied here a bit from Julian Hyde&amp;#39;s excellent documentation):&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;h4 style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;a id="Table_Names_5076158787123859" name="Table_Names_5076158787123859"&gt;&lt;/a&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;b&gt;&lt;font size="2"&gt;Table Names&lt;/font&gt;&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/h4&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;As an example of applying the aggregate table name rule, let the fact table be called&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;sales_fact_1997&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;, the&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;Sales&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;&amp;nbsp;cube&amp;#39;s fact table from the FoodMart schema. Applying the specific fact table name to the regular expression template creates the following regular expression:&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;agg_.+_sales_fact_1997&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;This will match the following table names:&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;ul style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;li style="background-color:transparent;color:#000000;font-family:arial;font-style:normal;list-style-type:disc;vertical-align:baseline"&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;agg_l_05_sales_fact_1997&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="background-color:transparent;color:#000000;font-family:arial;font-style:normal;list-style-type:disc;vertical-align:baseline"&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;agg_c_14_sales_fact_1997&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="background-color:transparent;color:#000000;font-family:arial;font-style:normal;list-style-type:disc;vertical-align:baseline"&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;agg_lc_100_sales_fact_1997&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="background-color:transparent;color:#000000;font-family:arial;font-style:normal;list-style-type:disc;vertical-align:baseline"&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;agg_c_special_sales_fact_1997&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="background-color:transparent;color:#000000;font-family:arial;font-style:normal;list-style-type:disc;vertical-align:baseline"&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;AGG_45_SALES_FACT_1997&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="background-color:transparent;color:#000000;font-family:arial;font-style:normal;list-style-type:disc;vertical-align:baseline"&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;AGG_drop_time_id_sales_fact_1997&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;h4 style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;a id="Column_Names_4393553636036813" name="Column_Names_4393553636036813"&gt;&lt;/a&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;b&gt;&lt;font size="2"&gt; Column Names&lt;/font&gt;&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/h4&gt;&lt;ul style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;li style="background-color:transparent;color:#000000;font-family:arial;font-style:normal;list-style-type:disc;vertical-align:baseline"&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;There has to be one column called &amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;b&gt;&lt;font size="2"&gt;fact_count&lt;/font&gt;&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;&amp;quot;, which stores values of a standard count.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="background-color:transparent;color:#000000;font-family:arial;font-style:normal;list-style-type:disc;vertical-align:baseline"&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;If there are any&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;b&gt;&lt;font size="2"&gt;ID columns&lt;/font&gt;&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;&amp;nbsp;in the aggregated table, they have to be of the same name as in the fact or dimensional table.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="background-color:transparent;color:#000000;font-family:arial;font-style:normal;list-style-type:disc;vertical-align:baseline"&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;b&gt;&lt;font size="2"&gt;Level columns&lt;/font&gt;&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;:&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;ul&gt;&lt;li style="background-color:transparent;color:#000000;font-family:arial;font-style:normal;list-style-type:circle;vertical-align:baseline"&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#ff0000"&gt;&lt;font size="2"&gt;${usage_prefix}${level_column_name}&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;: If you have a level that is used more than once, i.e. Year in a week hierarchy and a month hierarchy within the time dimension, then set a &amp;quot;usagePrefix&amp;quot; in the Schema so that they can be distinguished. I.E. usage prefix &amp;quot;TW_&amp;quot; for year in the week hierarchy (resutls in &amp;quot;TW_Year&amp;quot;) and &amp;quot;TM_&amp;quot; for year in the month hierarchy (results in &amp;quot;TM_Year&amp;quot;).&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;ul style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;ul&gt;&lt;li style="background-color:transparent;color:#000000;font-family:arial;font-style:normal;list-style-type:circle;vertical-align:baseline"&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#ff0000"&gt;&lt;font size="2"&gt;${hierarchy_name}_${level_name}&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="background-color:transparent;color:#000000;font-family:arial;font-style:normal;list-style-type:circle;vertical-align:baseline"&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#ff0000"&gt;&lt;font size="2"&gt;${hierarchy_name}_${level_column_name}&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="background-color:transparent;color:#000000;font-family:arial;font-style:normal;list-style-type:circle;vertical-align:baseline"&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#ff0000"&gt;&lt;font size="2"&gt;${level_column_name}&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;p style="font-family:&amp;#39;Times New Roman&amp;#39;;margin-left:37.5pt;margin-right:7.5pt"&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;If any of these parameters have space characters, &amp;#39; &amp;#39;, these are mapped to underscore characters, &amp;#39;_&amp;#39;, and, similarly, dot characters, &amp;#39;.&amp;#39;, are also mapped to underscores. So, if the hierarchy_name is &amp;quot;Time&amp;quot;, level_name is &amp;quot;Month&amp;quot; and level_column_name is month_of_year, the possible aggregate table column names are:&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;ul style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;li style="background-color:transparent;color:#000000;font-family:arial;font-style:normal;list-style-type:disc;vertical-align:baseline"&gt;&lt;p style="margin-right:7.5pt"&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;time_month&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="background-color:transparent;color:#000000;font-family:arial;font-style:normal;list-style-type:disc;vertical-align:baseline"&gt;&lt;p style="margin-right:7.5pt"&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;time_month_of_year&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="background-color:transparent;color:#000000;font-family:arial;font-style:normal;list-style-type:disc;vertical-align:baseline"&gt;&lt;p style="margin-right:7.5pt"&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;month_of_year&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style="font-family:&amp;#39;Times New Roman&amp;#39;;margin-left:37.5pt;margin-right:7.5pt"&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;For this rule, the &amp;quot;hierarchy_name&amp;quot; and &amp;quot;level_name&amp;quot; are converted to lower case while the &amp;quot;level_column_name&amp;quot;&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;u&gt;&lt;font size="2"&gt;must&lt;/font&gt;&lt;/u&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;&amp;nbsp;match exactly.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="font-family:&amp;#39;Times New Roman&amp;#39;;margin-left:37.5pt;margin-right:7.5pt"&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;b&gt;&lt;font size="2"&gt;Make sure the column names are in small letters!&lt;/font&gt;&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;ul style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;li style="background-color:transparent;color:#000000;font-family:arial;font-style:normal;list-style-type:disc;vertical-align:baseline"&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;There are three parameters to matching aggregate columns to&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;b&gt;&lt;font size="2"&gt;measures&lt;/font&gt;&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;:&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;p style="font-family:&amp;#39;Times New Roman&amp;#39;;margin-left:37.5pt;margin-right:7.5pt"&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;&amp;nbsp;1)&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#ff0000"&gt;&lt;font size="2"&gt;${measure_name}&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;: the fact table&amp;#39;s cube&amp;#39;s measure name, &amp;quot;measure_name&amp;quot;,&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="font-family:&amp;#39;Times New Roman&amp;#39;;margin-left:37.5pt;margin-right:7.5pt"&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;&amp;nbsp;2)&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#ff0000"&gt;&lt;font size="2"&gt;${measure_column_name}&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;: the fact table&amp;#39;s cube&amp;#39;s measure column name, &amp;quot;measure_column_name&amp;quot;, and&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="font-family:&amp;#39;Times New Roman&amp;#39;;margin-left:37.5pt;margin-right:7.5pt"&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;&amp;nbsp;3)&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#ff0000"&gt;&lt;font size="2"&gt;${measure_column_name}_${aggregate_name}&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;: the fact table&amp;#39;s cube&amp;#39;s measure&amp;#39;s aggregator (sum, avg, max, etc.), &amp;quot;aggregate_name&amp;quot;.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;where the measure name is converted to lower case and both the measure column name and aggregate name are matched as they appear. If the fact table&amp;#39;s cube&amp;#39;s measure name was, &amp;quot;Avg Unit Sales&amp;quot;, the fact table&amp;#39;s measure column name is &amp;quot;unit_sales&amp;quot;, and, lastly, the fact table&amp;#39;s cube&amp;#39;s measure&amp;#39;s aggregate name is &amp;quot;avg&amp;quot;, then possible aggregate table column names that would match are:&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;ul style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;li style="background-color:transparent;color:#000000;font-family:arial;font-style:normal;list-style-type:disc;vertical-align:baseline"&gt;&lt;p style="margin-right:7.5pt"&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;avg_unit_sales&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="background-color:transparent;color:#000000;font-family:arial;font-style:normal;list-style-type:disc;vertical-align:baseline"&gt;&lt;p style="margin-right:7.5pt"&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;unit_sales&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="background-color:transparent;color:#000000;font-family:arial;font-style:normal;list-style-type:disc;vertical-align:baseline"&gt;&lt;p style="margin-right:7.5pt"&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;unit_sales_avg&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;p style="font-family:&amp;#39;Times New Roman&amp;#39;;margin-left:37.5pt;margin-right:7.5pt"&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;In example: A measure called &amp;quot;Distinct Users&amp;quot; has to be referenced as &amp;quot;distinct_users&amp;quot;.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;h3 style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;a id="Your_first_aggregated_tables_5618361867964268" name="Your_first_aggregated_tables_5618361867964268"&gt;&lt;/a&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;b&gt;&lt;font size="3"&gt; Your first aggregated tables&lt;/font&gt;&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/h3&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;We have following tables:&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;b&gt;&lt;font size="2"&gt;The fact table&lt;/font&gt;&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;:&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;DROP TABLE IF EXISTS `pentaho`.`sn_login`;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;CREATE TABLE &amp;nbsp;`pentaho`.`sn_login` (&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;`msisdn` bigint(20) NOT NULL DEFAULT &amp;#39;0&amp;#39;,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;`login_date_id` bigint(20) NOT NULL DEFAULT &amp;#39;0&amp;#39;,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;`login_channel_id` bigint(20) NOT NULL DEFAULT &amp;#39;6&amp;#39; COMMENT &amp;#39;Default Value Unknown&amp;#39;,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;`sessions` int(255) NOT NULL DEFAULT &amp;#39;0&amp;#39;,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;PRIMARY KEY (`msisdn`,`login_date_id`,`login_channel_id`),&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;KEY `FK_sn_login_date_id` (`login_date_id`),&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;KEY `FK_login_channel_id` (`login_channel_id`),&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;KEY `login_msisdn` (`msisdn`),&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;CONSTRAINT `FK_login_channel_id` FOREIGN KEY (`login_channel_id`) REFERENCES `sn_lt_communication_channels` (`communication_channel_id`) ON DELETE CASCADE ON UPDATE CASCADE,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;CONSTRAINT `FK_login_msisdn` FOREIGN KEY (`msisdn`) REFERENCES `sn_user` (`msisdn`),&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;CONSTRAINT `FK_sn_login_date_id` FOREIGN KEY (`login_date_id`) REFERENCES `sn_lt_time_dimension` (`time_dimension_id`) ON DELETE CASCADE ON UPDATE CASCADE&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;) ENGINE=InnoDB DEFAULT CHARSET=latin1;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;b&gt;&lt;font size="2"&gt;The time dimension table&lt;/font&gt;&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;:&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;DROP TABLE IF EXISTS `pentaho`.`sn_lt_time_dimension`;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;CREATE TABLE &amp;nbsp;`pentaho`.`sn_lt_time_dimension` (&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;`the_year` int(11) DEFAULT NULL,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;`the_week_of_the_year` int(11) DEFAULT NULL,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;`the_month` int(11) DEFAULT NULL,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;`the_day_of_the_year` int(11) DEFAULT NULL,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;`the_day_of_the_week` int(11) DEFAULT NULL,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;`the_day_of_the_month` int(11) DEFAULT NULL,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;`the_month_name` varchar(9) DEFAULT NULL,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;`tenure_years` int(11) DEFAULT NULL,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;`tenure_days` int(11) DEFAULT NULL,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;`time_dimension_id` bigint(20) NOT NULL DEFAULT &amp;#39;0&amp;#39;,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;`the_date` date DEFAULT NULL,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;`the_date_as_string` varchar(20) DEFAULT NULL,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;`age` int(11) DEFAULT NULL,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;`the_quarter` int(3) DEFAULT NULL,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;PRIMARY KEY (`time_dimension_id`)&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;) ENGINE=InnoDB DEFAULT CHARSET=latin1;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;b&gt;&lt;font size="2"&gt;The channel dimension table&lt;/font&gt;&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;:&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;DROP TABLE IF EXISTS `pentaho`.`sn_lt_communication_channels`;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;CREATE TABLE &amp;nbsp;`pentaho`.`sn_lt_communication_channels` (&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;`communication_channel_id` bigint(20) NOT NULL AUTO_INCREMENT,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;`channel_name` varchar(45) NOT NULL,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;`channel_system_name` varchar(45) NOT NULL,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;PRIMARY KEY (`communication_channel_id`)&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;b&gt;&lt;font size="2"&gt;The user dimension table&lt;/font&gt;&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;:&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;DROP TABLE IF EXISTS `pentaho`.`sn_user`;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;CREATE TABLE &amp;nbsp;`pentaho`.`sn_user` (&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;`msisdn` bigint(20) NOT NULL DEFAULT &amp;#39;0&amp;#39;,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;`sex` char(1) DEFAULT NULL,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;`registration_date_id` bigint(20) NOT NULL DEFAULT &amp;#39;0&amp;#39;,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;`country_id` bigint(20) NOT NULL DEFAULT &amp;#39;0&amp;#39;,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;`birthday_date_id` bigint(20) NOT NULL,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;`registration_channel_id` bigint(20) NOT NULL,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;PRIMARY KEY (`msisdn`),&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;KEY `msisdn` (`msisdn`),&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;KEY `FK_birthday_date_id` (`birthday_date_id`),&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;KEY `FK_registration_date_id` (`registration_date_id`),&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;KEY `FK_country_id_2` (`country_id`),&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;KEY `FK_registration_channel_id` (`registration_channel_id`),&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;CONSTRAINT `FK_birthday_date_id` FOREIGN KEY (`birthday_date_id`) REFERENCES `sn_lt_time_dimension` (`time_dimension_id`) ON DELETE NO ACTION ON UPDATE NO ACTION,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;CONSTRAINT `FK_country_id_2` FOREIGN KEY (`country_id`) REFERENCES `sn_lt_countries` (`country_id`) ON DELETE NO ACTION ON UPDATE NO ACTION,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;CONSTRAINT `FK_registration_channel_id` FOREIGN KEY (`registration_channel_id`) REFERENCES `sn_lt_communication_channels` (`communication_channel_id`) ON DELETE CASCADE ON UPDATE CASCADE,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;CONSTRAINT `FK_registration_date_id` FOREIGN KEY (`registration_date_id`) REFERENCES `sn_lt_time_dimension` (`time_dimension_id`) ON DELETE NO ACTION ON UPDATE NO ACTION&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;) ENGINE=InnoDB DEFAULT CHARSET=latin1;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;b&gt;&lt;font size="2"&gt;The country dimension table&lt;/font&gt;&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;:&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;DROP TABLE IF EXISTS `pentaho`.`sn_lt_countries`;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;CREATE TABLE &amp;nbsp;`pentaho`.`sn_lt_countries` (&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;`country_id` bigint(20) NOT NULL DEFAULT &amp;#39;0&amp;#39;,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;`country_name` tinytext,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;`country_number` double DEFAULT NULL,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;`iso_country_code` tinytext,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;PRIMARY KEY (`country_id`)&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;) ENGINE=InnoDB DEFAULT CHARSET=latin1;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;We have created an XML Schema (Cube Definition that looks like this):&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;lt;Schema name=&amp;quot;Test&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;lt;Dimension type=&amp;quot;TimeDimension&amp;quot; usagePrefix=&amp;quot;TM_&amp;quot; name=&amp;quot;Time Monthly&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp;&amp;lt;Hierarchy name=&amp;quot;All Times Monthly&amp;quot; hasAll=&amp;quot;true&amp;quot; allMemberName=&amp;quot;All Times Monthly&amp;quot; allMemberCaption=&amp;quot;All Times Monthly&amp;quot; primaryKey=&amp;quot;time_dimension_id&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Table name=&amp;quot;sn_lt_time_dimension&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/Table&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Level name=&amp;quot;Year&amp;quot; column=&amp;quot;the_year&amp;quot; type=&amp;quot;Integer&amp;quot; uniqueMembers=&amp;quot;true&amp;quot; levelType=&amp;quot;TimeYears&amp;quot; hideMemberIf=&amp;quot;Never&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/Level&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Level name=&amp;quot;Quarter&amp;quot; column=&amp;quot;the_quarter&amp;quot; type=&amp;quot;Integer&amp;quot; uniqueMembers=&amp;quot;false&amp;quot; levelType=&amp;quot;TimeQuarters&amp;quot; hideMemberIf=&amp;quot;Never&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/Level&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Level name=&amp;quot;Month&amp;quot; column=&amp;quot;the_month&amp;quot; nameColumn=&amp;quot;the_month_name&amp;quot; type=&amp;quot;String&amp;quot; uniqueMembers=&amp;quot;false&amp;quot; levelType=&amp;quot;TimeMonths&amp;quot; hideMemberIf=&amp;quot;Never&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/Level&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Level name=&amp;quot;Day&amp;quot; column=&amp;quot;the_day_of_the_month&amp;quot; type=&amp;quot;Integer&amp;quot; uniqueMembers=&amp;quot;false&amp;quot; levelType=&amp;quot;TimeDays&amp;quot; hideMemberIf=&amp;quot;Never&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/Level&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp;&amp;lt;/Hierarchy&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;lt;/Dimension&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;lt;Dimension type=&amp;quot;StandardDimension&amp;quot; name=&amp;quot;Country&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp;&amp;lt;Hierarchy name=&amp;quot;All Countries&amp;quot; hasAll=&amp;quot;true&amp;quot; allMemberName=&amp;quot;All Countries&amp;quot; allMemberCaption=&amp;quot;All Countries&amp;quot; primaryKey=&amp;quot;country_id&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Table name=&amp;quot;sn_lt_countries&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/Table&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Level name=&amp;quot;Country&amp;quot; column=&amp;quot;country_name&amp;quot; type=&amp;quot;String&amp;quot; uniqueMembers=&amp;quot;false&amp;quot; levelType=&amp;quot;Regular&amp;quot; hideMemberIf=&amp;quot;Never&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/Level&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp;&amp;lt;/Hierarchy&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;lt;/Dimension&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;lt;Dimension type=&amp;quot;TimeDimension&amp;quot; usagePrefix=&amp;quot;TW_&amp;quot; name=&amp;quot;Time Weekly&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp;&amp;lt;Hierarchy name=&amp;quot;All Times Weekly&amp;quot; hasAll=&amp;quot;true&amp;quot; allMemberName=&amp;quot;All Times Weekly&amp;quot; allMemberCaption=&amp;quot;All Times Weekly&amp;quot; primaryKey=&amp;quot;time_dimension_id&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Table name=&amp;quot;sn_lt_time_dimension&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/Table&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Level name=&amp;quot;Year&amp;quot; column=&amp;quot;the_year&amp;quot; type=&amp;quot;Integer&amp;quot; uniqueMembers=&amp;quot;true&amp;quot; levelType=&amp;quot;TimeYears&amp;quot; hideMemberIf=&amp;quot;Never&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/Level&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Level name=&amp;quot;Week&amp;quot; column=&amp;quot;the_week_of_the_year&amp;quot; type=&amp;quot;Integer&amp;quot; uniqueMembers=&amp;quot;false&amp;quot; levelType=&amp;quot;TimeWeeks&amp;quot; hideMemberIf=&amp;quot;Never&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/Level&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Level name=&amp;quot;Day&amp;quot; column=&amp;quot;the_day_of_the_week&amp;quot; type=&amp;quot;Numeric&amp;quot; uniqueMembers=&amp;quot;false&amp;quot; levelType=&amp;quot;TimeDays&amp;quot; hideMemberIf=&amp;quot;Never&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/Level&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp;&amp;lt;/Hierarchy&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;lt;/Dimension&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;lt;Cube name=&amp;quot;Users&amp;quot; cache=&amp;quot;true&amp;quot; enabled=&amp;quot;true&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp;&amp;lt;Table name=&amp;quot;sn_user&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp;&amp;lt;/Table&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp;&amp;lt;Dimension type=&amp;quot;StandardDimension&amp;quot; name=&amp;quot;Gender&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Hierarchy name=&amp;quot;All Genders&amp;quot; hasAll=&amp;quot;true&amp;quot; allMemberName=&amp;quot;All Genders&amp;quot; allMemberCaption=&amp;quot;All Genders&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Level name=&amp;quot;Gender&amp;quot; column=&amp;quot;sex&amp;quot; nameColumn=&amp;quot;sex&amp;quot; type=&amp;quot;String&amp;quot; uniqueMembers=&amp;quot;true&amp;quot; levelType=&amp;quot;Regular&amp;quot; hideMemberIf=&amp;quot;Never&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/Level&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/Hierarchy&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp;&amp;lt;/Dimension&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp;&amp;lt;Dimension type=&amp;quot;StandardDimension&amp;quot; foreignKey=&amp;quot;registration_channel_id&amp;quot; name=&amp;quot;Registration Channel&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Hierarchy name=&amp;quot;All Registration Channels&amp;quot; hasAll=&amp;quot;true&amp;quot; allMemberName=&amp;quot;All Registration Channels&amp;quot; allMemberCaption=&amp;quot;All Registration Channels&amp;quot; primaryKey=&amp;quot;communication_channel_id&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Table name=&amp;quot;sn_lt_communication_channels&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/Table&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Level name=&amp;quot;Registration Channel&amp;quot; column=&amp;quot;channel_name&amp;quot; type=&amp;quot;String&amp;quot; uniqueMembers=&amp;quot;false&amp;quot; levelType=&amp;quot;Regular&amp;quot; hideMemberIf=&amp;quot;Never&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/Level&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/Hierarchy&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp;&amp;lt;/Dimension&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp;&amp;lt;Dimension type=&amp;quot;StandardDimension&amp;quot; foreignKey=&amp;quot;birthday_date_id&amp;quot; name=&amp;quot;Age&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Hierarchy name=&amp;quot;All Ages&amp;quot; hasAll=&amp;quot;true&amp;quot; allMemberName=&amp;quot;All Ages&amp;quot; allMemberCaption=&amp;quot;All Ages&amp;quot; primaryKey=&amp;quot;time_dimension_id&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Table name=&amp;quot;sn_lt_time_dimension&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/Table&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Level name=&amp;quot;Age&amp;quot; column=&amp;quot;age&amp;quot; type=&amp;quot;Integer&amp;quot; uniqueMembers=&amp;quot;false&amp;quot; levelType=&amp;quot;Regular&amp;quot; hideMemberIf=&amp;quot;Never&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/Level&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/Hierarchy&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp;&amp;lt;/Dimension&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp;&amp;lt;DimensionUsage source=&amp;quot;Time Monthly&amp;quot; name=&amp;quot;Registration Time Monthly&amp;quot; caption=&amp;quot;Registration Time Monthly&amp;quot; foreignKey=&amp;quot;registration_date_id&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp;&amp;lt;/DimensionUsage&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp;&amp;lt;DimensionUsage source=&amp;quot;Country&amp;quot; name=&amp;quot;Country&amp;quot; caption=&amp;quot;Country&amp;quot; foreignKey=&amp;quot;country_id&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp;&amp;lt;/DimensionUsage&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp;&amp;lt;DimensionUsage source=&amp;quot;Time Weekly&amp;quot; name=&amp;quot;Registration Time Weekly&amp;quot; caption=&amp;quot;Registration Time Weekly&amp;quot; foreignKey=&amp;quot;registration_date_id&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp;&amp;lt;/DimensionUsage&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp;&amp;lt;Measure name=&amp;quot;New Registrations&amp;quot; column=&amp;quot;msisdn&amp;quot; datatype=&amp;quot;Numeric&amp;quot; aggregator=&amp;quot;count&amp;quot; visible=&amp;quot;true&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp;&amp;lt;/Measure&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;lt;/Cube&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt; &lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;lt;/Schema&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font style="background-color:#ffffff"&gt;&lt;font size="2"&gt;We are going to pay attention to three dimensions:&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;ul style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;li style="background-color:transparent;color:#000000;font-family:arial;font-style:normal;list-style-type:disc;vertical-align:baseline"&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;b&gt;&lt;font size="2"&gt;Country&lt;/font&gt;&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;: You can see that this dimension is derived from joining 3 tables: sn_login, sn_user and sn_countries. In fact, our Schema is of the type &amp;quot;snowflake schema&amp;quot;.&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="background-color:transparent;color:#000000;font-family:arial;font-style:normal;list-style-type:disc;vertical-align:baseline"&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;b&gt;&lt;font size="2"&gt;Login Channel&lt;/font&gt;&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;: This is a simple dimension which is derived form just one join: sn_login and sn_lt_communication_channels.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="background-color:transparent;color:#000000;font-family:arial;font-style:normal;list-style-type:disc;vertical-align:baseline"&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;b&gt;&lt;font size="2"&gt;Login Time&lt;/font&gt;&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;: This dimension references a global dimension. Within a Cube Definition, a global dimension can be referenced within several cubes in the same Schema. This is very handy, as you don&amp;#39;t have to recreate the same dimension over and over again.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;h4 style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;a id="Aggregated_table_for_login_cha_5562107663135976" name="Aggregated_table_for_login_cha_5562107663135976"&gt;&lt;/a&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;b&gt;&lt;font size="2"&gt; Aggregated table for login channel&lt;/font&gt;&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/h4&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;We basically want to see how many user login by week in each of the channels.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;The MDX query therefore looks like:&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;WITH&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;MEMBER [Measures].[Prior Period Distinct Logins] AS&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;(&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;[Login Time Weekly].CurrentMember.PrevMember,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;[Measures].[Distinct Users]&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;)&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;MEMBER [Measures].[Change in Distinct Logins] AS&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;(&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;[Measures].[Distinct Users] - [Measures].[Prior Period Distinct Logins]&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;)&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;MEMBER [Measures].[Percent Change] AS&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;(&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;([Measures].[Change in Distinct Logins]) /&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;([Measures].[Prior Period Distinct Logins])&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;)&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&amp;nbsp;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;, FORMAT_STRING = Iif(&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;([Measures].[Percent Change] &amp;lt; 0),&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;quot;|#.00%|style=&amp;#39;red&amp;#39;|arrow=&amp;#39;down&amp;#39;&amp;quot;,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;quot;|#.00%|style=&amp;#39;green&amp;#39;|arrow=&amp;#39;up&amp;#39;&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;)&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;SELECT&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;NON EMPTY {&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;LastPeriods(&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;6,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;[Login Time Weekly].[{week1_year}].[{week1_weeknr}]&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;)&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;}&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;ON COLUMNS,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;NON EMPTY Union (&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;Crossjoin (&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;{[Login Channel].[All Login Channels]},&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;{[Measures].[Distinct Users],&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;[Measures].[Percent Change]&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;),&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;Crossjoin (&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;{[Login Channel].[All Login Channels].Children},&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;{[Measures].[Distinct Users]&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;)&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;)&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;ON ROWS&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;from [Logins]&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;We create an Xaction with a JPivot viewer in the Design Studio, save it into one solution folder and execute it online. Now we open the mondrian_sql.log and we see that Mondrian create a lot of queries. Analyse these queries carefully.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;Now, having looked at the queries in the mondrian_sql.log, I decided to create following aggregated tables:&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;-- channel / week -------------------------------&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;DROP TABLE IF EXISTS `agg_channel_week_sn_login`;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;CREATE TABLE `agg_channel_week_sn_login` (&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `login_channel_id` BIGINT(20),&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `TW_the_year` INTEGER(11),&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `the_week_of_the_year` INTEGER(11),&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `distinct_users` INTEGER,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `sessions` DOUBLE,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `fact_count` INTEGER,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; KEY `agg_channel_week_login_channel_id` (`login_channel_id`),&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; KEY `agg_channel_week_TW_the_year` (`TW_the_year`),&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; KEY `agg_channel_week_the_week_of_the_year` (`the_week_of_the_year`) &amp;nbsp; &amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; );&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;INSERT INTO `agg_channel_week_sn_login` (&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `login_channel_id`,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `TW_the_year`,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `the_week_of_the_year`,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `distinct_users`,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `sessions`,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `fact_count`)&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;select&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `sn_login`.`login_channel_id` as `login_channel_id`,&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `sn_lt_time_dimension_3`.`the_year` as `TW_the_year`,&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `sn_lt_time_dimension_3`.`the_week_of_the_year` as `the_week_of_the_year`,&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; count(distinct `sn_login`.`msisdn`) as `distinct_users`,&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; sum(`sn_login`.`sessions`) as `sessions`,&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; count(*) as `fact_count`&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;from&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `sn_login` as `sn_login`,&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `sn_lt_time_dimension` as `sn_lt_time_dimension_3`&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;where&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `sn_login`.`login_date_id` = `sn_lt_time_dimension_3`.`time_dimension_id`&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;group by 1,2,3&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;And also one higher level one:&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;-- week ---------------------------------&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;DROP TABLE IF EXISTS `agg_week_sn_login`;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;CREATE TABLE `agg_week_sn_login` (&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `TW_the_year` INTEGER(11),&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `the_week_of_the_year` INTEGER(11),&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `distinct_users` INTEGER,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `sessions` DOUBLE,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `fact_count` INTEGER,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; KEY `agg_week_TW_the_year` (`TW_the_year`),&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; KEY `agg_week_the_week_of_the_year` (`the_week_of_the_year`) &amp;nbsp; &amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; );&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;INSERT INTO `agg_week_sn_login` (&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `TW_the_year`,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `the_week_of_the_year`,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `distinct_users`,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `sessions`,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `fact_count`)&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;select&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `sn_lt_time_dimension_3`.`the_year` as `TW_the_year`,&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `sn_lt_time_dimension_3`.`the_week_of_the_year` as `the_week_of_the_year`,&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; count(distinct `sn_login`.`msisdn`) as `distinct_users`,&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; sum(`sn_login`.`sessions`) as `sessions`,&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; count(*) as `fact_count`&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;from&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `sn_login` as `sn_login`,&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `sn_lt_time_dimension` as `sn_lt_time_dimension_3`&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;where&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `sn_login`.`login_date_id` = `sn_lt_time_dimension_3`.`time_dimension_id`&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;group by 1,2&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;Pay special attention on the naming:&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;ul style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;li style="background-color:transparent;color:#000000;font-family:arial;font-style:normal;list-style-type:disc;vertical-align:baseline"&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;The year column is named TW_the_year. Why the &amp;quot;TW_&amp;quot; prefix you wonder? This is because the year actually shows up twice in our cube schema: in the Time Week and in the Time Month dimension. We defined a &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;b&gt;&lt;font size="2"&gt;usagePrefix &lt;/font&gt;&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;in the cube schema in order to distinguish between these two occurrences. Here in the table definition you have to use this prefix, otherwise Mondrian is not able to distinguish between these two occurrences of the year level and will throw an error.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="background-color:transparent;color:#000000;font-family:arial;font-style:normal;list-style-type:disc;vertical-align:baseline"&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;Every table has a column called fact_count, which is a simple count.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="background-color:transparent;color:#000000;font-family:arial;font-style:normal;list-style-type:disc;vertical-align:baseline"&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;Most columns are in lower case, also have you realized how our Measure &amp;quot;Distinct Users&amp;quot; has changed into &amp;quot;distinct_users&amp;quot;?&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="background-color:transparent;color:#000000;font-family:arial;font-style:normal;list-style-type:disc;vertical-align:baseline"&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;All columns have the same name as they have in the dimension table (the year has obviously the prefix).&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="background-color:transparent;color:#000000;font-family:arial;font-style:normal;list-style-type:disc;vertical-align:baseline"&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;All the table names start with agg_*_yourtablename. This is very important!&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;Now we have to add following lines to the cube schema (the cube definition) within the table tags in order to tell Mondrian which tables to use etc [highlighted in blue]:&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;lt;Table name=&amp;quot;sn_login&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#0c343d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;AggName name=&amp;quot;agg_channel_week_sn_login&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#0c343d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;AggFactCount column=&amp;quot;fact_count&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#0c343d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/AggFactCount&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#0c343d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;AggForeignKey factColumn=&amp;quot;login_channel_id&amp;quot; aggColumn=&amp;quot;login_channel_id&amp;quot;/&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#0c343d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;AggMeasure column=&amp;quot;distinct_users&amp;quot; name=&amp;quot;[Measures].[Distinct Users]&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#0c343d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/AggMeasure&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#0c343d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;AggMeasure column=&amp;quot;sessions&amp;quot; name=&amp;quot;[Measures].[Sessions]&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#0c343d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/AggMeasure&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#0c343d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;AggLevel column=&amp;quot;TW_the_year&amp;quot; name=&amp;quot;[Login Time Weekly.All Times Weekly].[Year]&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#0c343d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/AggLevel&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#0c343d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;AggLevel column=&amp;quot;the_week_of_the_year&amp;quot; name=&amp;quot;[Login Time Weekly.All Times Weekly].[Week]&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#0c343d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/AggLevel&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#0c343d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/AggName&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#0c343d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;AggName name=&amp;quot;agg_week_sn_login&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#0c343d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;AggFactCount column=&amp;quot;fact_count&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#0c343d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/AggFactCount&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#0c343d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;AggMeasure column=&amp;quot;distinct_users&amp;quot; name=&amp;quot;[Measures].[Distinct Users]&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#0c343d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/AggMeasure&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#0c343d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;AggMeasure column=&amp;quot;sessions&amp;quot; name=&amp;quot;[Measures].[Sessions]&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#0c343d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/AggMeasure&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#0c343d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;AggLevel column=&amp;quot;TW_the_year&amp;quot; name=&amp;quot;[Login Time Weekly.All Times Weekly].[Year]&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#0c343d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/AggLevel&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#0c343d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;AggLevel column=&amp;quot;the_week_of_the_year&amp;quot; name=&amp;quot;[Login Time Weekly.All Times Weekly].[Week]&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#0c343d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/AggLevel&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#0c343d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/AggName&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;lt;/Table&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;As you can from this schema we are matching the column names of the aggregated table with the measures and dimensions that we defined in the schema itself. This way Mondrian can identify your columns and link it to a dimension/measure.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;An important thing to notice here is that we actually don&amp;#39;t have a level login_channel_id in the XML Schema (cube definition), but we can just use the AggForeignKey tag to reference it. Within the AggForeignKey you specify the name of the column in the fact table and the name of the same column in the aggregated table.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;Now save everything, export everything to your solution folder on the BI Server, go back to the Pentaho website, refresh the repository, clear the Mondrian cash and try to run the Xaction. In case you get an error message, check the Mondrian log files to figure out what went wrong. It is very easy to make mistakes, especially the spelling.&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;Once you succeed, you will see in the mondrian_sql.log that Mondrian is in fact using your aggregated tables (and certainly you will realize that the execution is way faster).&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;h4 style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;a id="Aggregated_table_for_country_6223295337986201" name="Aggregated_table_for_country_6223295337986201"&gt;&lt;/a&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;b&gt;&lt;font size="2"&gt;Aggregated table for country&lt;/font&gt;&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/h4&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;We have following MDX query with gives us the Top3 countries by week:&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;SELECT&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;[Measures].[Distinct Users]&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;ON COLUMNS,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;Generate (&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;{LastPeriods(&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;6,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;[Login Time Weekly].[{week1_year}].[{week1_weeknr}]&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;)}&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;{[Login Time Weekly].CurrentMember}*&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;TopCount(&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;[Country.All ISO Country Codes].Children,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;3,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;[Measures].[Distinct Users]&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;),&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;ALL&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;)&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;ON ROWS&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;FROM&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;[Logins]&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;Again, we create an Xaction, execute it on the website, and check the mondrian_sql.log. Then we decide to create following tables:&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;-- country / week -------------------------------&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;DROP TABLE IF EXISTS `agg_country_week_sn_login`;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;CREATE TABLE `agg_country_week_sn_login` (&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `iso_country_code` VARCHAR(100),&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `TW_the_year` INTEGER(11),&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `the_week_of_the_year` INTEGER(11),&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `distinct_users` INTEGER,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `sessions` DOUBLE,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `fact_count` INTEGER,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; KEY `agg_country_week_iso_country_code` (`iso_country_code`),&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; KEY `agg_country_week_TW_the_year` (`TW_the_year`),&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; KEY `agg_country_week_the_week_of_the_year` (`the_week_of_the_year`) &amp;nbsp; &amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; );&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&amp;nbsp;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;INSERT INTO `agg_country_week_sn_login` (&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `iso_country_code`,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `TW_the_year`,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `the_week_of_the_year`,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `distinct_users`,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `sessions`,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `fact_count`)&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;select&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `sn_lt_countries`.`iso_country_code` as `iso_country_code`,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `sn_lt_time_dimension_3`.`the_year` as `TW_the_year`,&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `sn_lt_time_dimension_3`.`the_week_of_the_year` as `the_week_of_the_year`,&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; count(distinct `sn_login`.`msisdn`) as `distinct_users`,&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; sum(`sn_login`.`sessions`) as `sessions`,&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; count(*) as `fact_count`&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;from&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `sn_login` as `sn_login`,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `sn_user` as `sn_user`,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `sn_lt_time_dimension` as `sn_lt_time_dimension_3`,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `sn_lt_countries` as `sn_lt_countries`&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;where&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `sn_login`.`msisdn`=`sn_user`.`msisdn` AND&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `sn_login`.`login_date_id` = `sn_lt_time_dimension_3`.`time_dimension_id` AND&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; `sn_lt_countries`.`country_id` = `sn_user`.`country_id`&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;group by 1,2,3&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;As you can see this is a bit more complex, as we have to join in fact 4 tables, and the iso_country_code is derived from joining 3 tables.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;We add following part to the cube definition (xml schema file) [highlighted in blue]:&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;lt;Table name=&amp;quot;sn_login&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;AggName name=&amp;quot;agg_channel_week_sn_login&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;AggFactCount column=&amp;quot;fact_count&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/AggFactCount&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;AggForeignKey factColumn=&amp;quot;login_channel_id&amp;quot; aggColumn=&amp;quot;login_channel_id&amp;quot;/&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;AggMeasure column=&amp;quot;distinct_users&amp;quot; name=&amp;quot;[Measures].[Distinct Users]&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/AggMeasure&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;AggMeasure column=&amp;quot;sessions&amp;quot; name=&amp;quot;[Measures].[Sessions]&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/AggMeasure&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;AggLevel column=&amp;quot;TW_the_year&amp;quot; name=&amp;quot;[Login Time Weekly.All Times Weekly].[Year]&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/AggLevel&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;AggLevel column=&amp;quot;the_week_of_the_year&amp;quot; name=&amp;quot;[Login Time Weekly.All Times Weekly].[Week]&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/AggLevel&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/AggName&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;AggName name=&amp;quot;agg_week_sn_login&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;AggFactCount column=&amp;quot;fact_count&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/AggFactCount&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;AggMeasure column=&amp;quot;distinct_users&amp;quot; name=&amp;quot;[Measures].[Distinct Users]&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/AggMeasure&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;AggMeasure column=&amp;quot;sessions&amp;quot; name=&amp;quot;[Measures].[Sessions]&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/AggMeasure&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;AggLevel column=&amp;quot;TW_the_year&amp;quot; name=&amp;quot;[Login Time Weekly.All Times Weekly].[Year]&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/AggLevel&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;AggLevel column=&amp;quot;the_week_of_the_year&amp;quot; name=&amp;quot;[Login Time Weekly.All Times Weekly].[Week]&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/AggLevel&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/AggName&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#134f5c"&gt;&lt;font size="2"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;AggName name=&amp;quot;agg_country_week_sn_login&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#134f5c"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;AggFactCount column=&amp;quot;fact_count&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#134f5c"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/AggFactCount&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#134f5c"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;AggMeasure column=&amp;quot;distinct_users&amp;quot; name=&amp;quot;[Measures].[Distinct Users]&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#134f5c"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/AggMeasure&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#134f5c"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;AggMeasure column=&amp;quot;sessions&amp;quot; name=&amp;quot;[Measures].[Sessions]&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#134f5c"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/AggMeasure&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#134f5c"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;AggLevel column=&amp;quot;TW_the_year&amp;quot; name=&amp;quot;[Login Time Weekly.All Times Weekly].[Year]&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#134f5c"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/AggLevel&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#134f5c"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;AggLevel column=&amp;quot;the_week_of_the_year&amp;quot; name=&amp;quot;[Login Time Weekly.All Times Weekly].[Week]&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#134f5c"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/AggLevel&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#134f5c"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;AggLevel column=&amp;quot;iso_country_code&amp;quot; name=&amp;quot;[Country.All ISO Country Codes].[ISO Country Code]&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#134f5c"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/AggLevel&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#134f5c"&gt;&lt;font size="2"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/AggName&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;lt;/Table&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;You see that in this case we don&amp;#39;t make use of an ID, as the country ID is not directly stored in our fact table. We have again collapsed the time dimension to the week level.&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;We save everything, export it to the BI Server and run our Xaction. If we get an error, we check the log, if not, we are pleased that we finally got everything running!&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color:transparent"&gt;&lt;font size="2"&gt;&lt;br&gt;&lt;/font&gt;&lt;/div&gt;&lt;h3&gt;&lt;a id="Make_use_of_aggregates_in_othe" name="Make_use_of_aggregates_in_othe"&gt;&lt;/a&gt;Make use of aggregates in other programs&lt;/h3&gt;&lt;div style="background-color:transparent"&gt;&lt;font face="verdana" size="2"&gt;Other programs or packages usually don&amp;#39;t take advantage of Mondrian aggregated tables by default. Usually they provide a mondrian.properties file to configure the exact settings. Just open the properties file and enable following properties:&lt;/font&gt;&lt;/div&gt;&lt;div style="background-color:transparent"&gt;&lt;font size="2"&gt;&lt;br&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style="background-color:transparent"&gt;&lt;div&gt;&lt;font size="2"&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;"&gt;# Allow the use of aggregates&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font size="2"&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;"&gt;mondrian.rolap.aggregates.Use=true&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font size="2"&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;"&gt;mondrian.rolap.aggregates.Read=true&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;&lt;font size="2"&gt;&lt;br&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style="background-color:transparent"&gt;&lt;font size="2"&gt;Please find below a reference for some of the programs so that you can easily find the mondrian.properties file:&lt;/font&gt;&lt;/div&gt;&lt;div style="background-color:transparent"&gt;&lt;ul&gt;&lt;li&gt;&lt;font size="2"&gt;&lt;b&gt;Pentaho Data Integration (Kettle)&lt;/b&gt;:&amp;nbsp;&lt;/font&gt;&lt;font size="2"&gt;&lt;font face="verdana"&gt;data-integration/libext/mondrian/config/mondrian.properties&lt;/font&gt;&lt;/font&gt;&lt;/li&gt;&lt;li&gt;&lt;font size="2"&gt;&lt;font face="verdana"&gt;&lt;b&gt;Pentaho Report Designer&lt;/b&gt;: report-designer/resources&lt;font face="verdana"&gt;&lt;font size="2"&gt;/mondrian.properties&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/li&gt;&lt;li&gt;&lt;font face="verdana" size="2"&gt;&lt;b&gt;Schema Workbench&lt;/b&gt;: schema-workbench&lt;font face="verdana"&gt;&lt;font size="2"&gt;/mondrian.properties&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div style="background-color:transparent"&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;This article is just intended as a brief introduction. In no way I claim that this is the best way to create aggregated tables, this should only give you the idea on how it works and you will have to find the best way for your solution. I have found no tuturial on the web on how to do this and it cost me a lot of time to figure out how to get everything working, so I hope that with the help of this article you won&amp;#39;t go through the same troubles. Again, creating everything manually is not easy, always check you spellings etc! Also read the excellent documentation by Julian Hyde which you can find&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;a href="http://mondrian.pentaho.org/documentation/aggregate_tables.php" style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#551a8b"&gt;&lt;u&gt;&lt;font size="2"&gt;here&lt;/font&gt;&lt;/u&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-style:normal;vertical-align:baseline"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4527276399966185267-8781032733207742893?l=diethardsteiner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://diethardsteiner.blogspot.com/feeds/8781032733207742893/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://diethardsteiner.blogspot.com/2011/05/tutorial-aggregated-tables-for-mondrian.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4527276399966185267/posts/default/8781032733207742893'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4527276399966185267/posts/default/8781032733207742893'/><link rel='alternate' type='text/html' href='http://diethardsteiner.blogspot.com/2011/05/tutorial-aggregated-tables-for-mondrian.html' title='Tutorial Aggregated Tables for Mondrian (Web)'/><author><name>Diethard Steiner</name><uri>https://profiles.google.com/101564429460248850938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4527276399966185267.post-6261309472247997544</id><published>2011-05-07T15:05:00.001-07:00</published><updated>2011-05-07T15:11:43.041-07:00</updated><title type='text'>Pentaho Data Integration: Supplying Variables to Shell Scripts</title><content type='html'>&lt;b&gt;&lt;font size="4"&gt;Pentaho Data Integration (Kettle): Supplying Kettle Variables to Shell Scripts&lt;/font&gt;&lt;/b&gt;&lt;br&gt;&lt;br&gt;&lt;b&gt;Tutorial Details&lt;/b&gt;&lt;br&gt;&lt;ul&gt;&lt;li&gt;Software: PDI/Kettle 4.1 (download &lt;a href="http://sourceforge.net/projects/pentaho/files/" id="nlz4" title="here"&gt;here&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;Knowledge: Intermediate (To follow this tutorial you should have good knowledge of the software and hence not every single step will be described)&lt;/li&gt;&lt;li&gt;OS: Linux or Mac OS X&lt;/li&gt;&lt;li&gt;Tutorial files can be downloaded &lt;a href="http://docs.google.com/leaf?id=0B-yuO-Oixq4RZGM1MzEwNzktN2QyYi00ZmE5LWFiYWItMmM2NTQxNjAwNGUz&amp;amp;hl=en_GB" id="lygl" title="here"&gt;here&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br&gt;&lt;div class="writely-toc" id="WritelyTableOfContents" toctype="none+none"&gt;&lt;ol class="writely-toc-none"&gt;&lt;li&gt;&lt;a href="#Approach_to_provide_arguments__44559986679814756" target="_self"&gt;A simple example&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="#Kettle_Infinidb_Series_Using_J" target="_self"&gt;Kettle / Infinidb Series: Using JDNI details with colxml&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;br&gt;&lt;div&gt;Last time we had a look at &lt;a href="http://diethardsteiner.blogspot.com/2011/03/pentaho-data-integration-scheduling-and.html" id="nl0o" title="supplying command line arguments to Kettle"&gt;Supplying command line arguments to Kettle&lt;/a&gt;. This time we take a look at supplying Kettle variables to the command line or shell scripts.&amp;nbsp;&lt;/div&gt;&lt;br&gt;&lt;div&gt;We will start this tutorial with a very general example (so that everybody can set it up) and in the second of half we will focus on a quite specific implementation.&lt;/div&gt;&lt;br&gt;&lt;div&gt;Before we start, we should evaluate the situation. With shell scripts comes huge power in regards to what you can achieve with it. It&amp;#39;s easy to fall into temptation and make use of this power, but is it to the benefit of your ETL process?&lt;/div&gt;&lt;br&gt;&lt;div&gt;My advice is to do as much as possible with the dedicated transformation steps and job entries (file and folder management, etc). The reasons are the following (to mention some of the most important ones):&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Steps are in most cases OS independent. Shell scripts are OS dependent.&lt;/li&gt;&lt;li&gt;Designing everything within one application (how easy is it to understand what each dedicated step does in contrast to writing custom code)&lt;/li&gt;&lt;li&gt;Easier maintenance&lt;/li&gt;&lt;/ul&gt;&lt;br&gt;Hence, use the shell job entry only in situation when Kettle doesn&amp;#39;t offer the functionality as a step/job entry.&amp;nbsp;&lt;br&gt;&lt;h2&gt;&lt;a id="Approach_to_provide_arguments__44559986679814756" name="Approach_to_provide_arguments__44559986679814756"&gt;&lt;/a&gt;A simple example&lt;/h2&gt;The intention of this example is that you can set it up easily and quickly learn how to pass on variables to a shell script. I strongly advice not to use this example in your real world ETL job but to use the dedicated Kettle job entry instead.&lt;/div&gt;&lt;br&gt;Keeping this in mind, we will create a transformation that supplies a folder name to a shell script and the shell script will then create a folder with exactly this name.&amp;nbsp;&lt;br&gt;&lt;br&gt;&lt;div&gt;Now there are two ways to specify a script for the &amp;quot;Execute a shell script&amp;quot; job entry. One way is to insert the script directly in the job entry properties, but this approach doesn&amp;#39;t allow you to specify any variables. To use variables, you have to create a dedicated shell file and reference it in the job entry properties.&lt;/div&gt;&lt;br&gt;&lt;ol&gt;&lt;li&gt;Open Spoon (Kettle) and create a new job&lt;/li&gt;&lt;li&gt;Save the job as&amp;nbsp;&lt;i&gt;jb_supply_var_to_shell_script_simple &lt;/i&gt;in a convenient folder.&lt;/li&gt;&lt;li&gt;Open the Terminal and navigate to the same folder. Create a file called&amp;nbsp;&lt;i&gt;create_folder.sh &lt;/i&gt;using vi: &lt;br&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;$ vi create_folder.sh&lt;br&gt;&lt;br&gt;&lt;/font&gt;&lt;table bgcolor="#eeeeee" border="1" bordercolor="#999999" cellpadding="3" cellspacing="0" width="100%"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td width="100%"&gt;&lt;b style="color:#cc0000"&gt;Note:&lt;/b&gt;&amp;nbsp;If you create the shell file on a Windows environment and then copy it over to a Linux environment, make sure that you first get rid of the control characters in the file. One utility which can help you with this is &lt;i&gt;dos2unix&lt;/i&gt;. If you don&amp;#39;t have it installed, use your favourite package manager (i.e. &lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;"&gt;$ yum install dos2unix&lt;/font&gt;) to install it. Once it is installed, run:&amp;nbsp;&lt;br&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;"&gt;dos2unix create_folder.sh&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br&gt;&lt;/li&gt;&lt;li&gt;Insert the following (Press i to insert):&lt;br&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;mkdir $1&lt;/font&gt;&lt;br&gt;$1 references the first parameter that is supplied via the command line to the shell script.&lt;/li&gt;&lt;li&gt;Make the file executable: &lt;br&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;$ chmod a+x create_folder.sh&lt;/font&gt;&lt;/li&gt;&lt;li&gt;Go back to Kettle and drag and drop a &lt;b&gt;Start&lt;/b&gt;&amp;nbsp;and &lt;b&gt;Execute a shell script&lt;/b&gt;&amp;nbsp;job entry onto the canvas&lt;/li&gt;&lt;li&gt;Create a hop between these job entries&lt;/li&gt;&lt;li&gt;We will now set up the folder name variable and specify a default value. Press CTRL+J to call the &lt;i&gt;Job Properties&lt;/i&gt; dialog. Click on the &lt;i&gt;Parameters&lt;/i&gt;&amp;nbsp;tab and specify VAR_FOLDER_NAME as a parameter as &lt;i&gt;test&lt;/i&gt;&amp;nbsp;as default value. Click &lt;i&gt;OK&lt;/i&gt;.&lt;br&gt;&lt;div id="oq_a" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_235gx8ns5g4_b" style="height:225px;width:474px"&gt;&lt;/div&gt;&lt;br&gt;&lt;/li&gt;&lt;li&gt;Double click on the &lt;b&gt;Execute a shell script &lt;/b&gt;job entry&lt;br&gt;&lt;div id="vr6n" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_234gcp662d4_b" style="height:623.6024096385541px;width:648px"&gt;&lt;/div&gt;&lt;br&gt;&lt;/li&gt;&lt;li&gt;Click on the &lt;i&gt;Script file name&lt;/i&gt;&amp;nbsp;input field; then press CTRL+Space and choose the internal job filename directory. Click &lt;i&gt;Browse &lt;/i&gt;and choose the shell file we just created. Note: Mac OS X users - the short cut doesn&amp;#39;t work, because CTRL+Space is reserved for Spotlight. Either you disable the shortcut or you manually write the variable name.&lt;/li&gt;&lt;li&gt;For the &lt;i&gt;Working directory&lt;/i&gt;&amp;nbsp;specify the internal job filename directory variable as well.&lt;/li&gt;&lt;li&gt;In the &lt;i&gt;Fields&lt;/i&gt;&amp;nbsp;section supply the ${VAR_FOLDER_NAME} variable.&lt;/li&gt;&lt;li&gt;Save the job and execute it. If you take a look at your folder, you will see that a new subfolder named &amp;quot;test&amp;quot; was created.&lt;/li&gt;&lt;/ol&gt;&lt;br&gt;&lt;br&gt;&lt;h2&gt;&lt;a id="Kettle_Infinidb_Series_Using_J" name="Kettle_Infinidb_Series_Using_J"&gt;&lt;/a&gt;Kettle / InfiniDB Series: Using Kettle JDNI details with colxml&lt;/h2&gt;&lt;div&gt;Although I make an attempt to provide some basic information below, I recommend reading my tutorial&amp;nbsp;&lt;a href="http://diethardsteiner.blogspot.com/2011/01/pentaho-data-integration-and-infinidb_01.html" id="mxz8" title="Pentaho Data Integration and Infinidb Series: Bulk Upload"&gt;Pentaho Data Integration and Infinidb Series: Bulk Upload&lt;/a&gt;&amp;nbsp;to get some more information about Infinidb.This will help understand this section better.&amp;nbsp;&lt;/div&gt;&lt;br&gt;InfiniDB is one of the more popular column oriented database. Currently Kettle doesn&amp;#39;t have a dedicated Infinidb bulk upload step. The fastest way to load data into InfiniDB is to use their command line utility called &lt;b&gt;cpimport&lt;/b&gt;. Cpimport only accepts job information in the form an xml file, which can be generated with &lt;b&gt;colxml&lt;/b&gt;&amp;nbsp;utility&lt;b&gt;&amp;nbsp;&lt;/b&gt;. Both cpimport and colxml reside in a sub-directory of the main InfiniDB installation and are usually only executable by the root user. In a nutshell, you tell colxml in which database (optionally table, what kind of delimiter, etc) you want your data file to be loaded and it spits out a nicely formated xml file which cpimport uses to process the data.&lt;div&gt;Now all this is an ideal candidate for the &lt;b&gt;Execute a shell script&lt;/b&gt;&amp;nbsp;job entry, because Kettle doesn&amp;#39;t provide this functionality out of the box (yet).&lt;br&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Now that we all know how the process works, let&amp;#39;s focus on our ETL process. If somebody wants to follow this section, you can download an open source version of Infinidb &lt;a href="http://infinidb.org/" id="dlo6" title="here"&gt;here&lt;/a&gt;&amp;nbsp;(you can find detailed installation instructions on the same website).&lt;/div&gt;&lt;br&gt;&lt;div&gt;If you are working with a lot of ETL files it is recommended to use JNDI connection details to make the maintenance easier. So instead of specifying all the database connection details for every step that requires them, we can simple store all our database connection details in the simple-jndi/jdbc.properties file, assign a name to each connection and reference this name in the Kettle step. So in the case that the database connection details change, you only have to change them in one place (namely the jdbc.properties file) and not in all Kettle steps. In our example, we will follow this approach.&amp;nbsp;&lt;/div&gt;&lt;br&gt;&lt;div&gt;The only tricky bit here is that colxml requires the database name. Kettle has actually a dedicated &lt;b&gt;Properties&lt;/b&gt;&amp;nbsp;&lt;b&gt;Input&lt;/b&gt; step (thanks to Slawo for pointing this out) which allows you to read the jdbc.properties file and with a bit of string manipulation we can extract the database name.&lt;/div&gt;&lt;br&gt;&lt;div&gt;For the example below to work you have create a table called &lt;i&gt;fact_impression&lt;/i&gt;&amp;nbsp;on a Infinidb database, have a working transformation that outputs a pipe separated file called &lt;i&gt;fact_impression.tbl&lt;/i&gt;&amp;nbsp;which we can bulk upload to the &lt;i&gt;fact_impression&lt;/i&gt;&amp;nbsp;table. Moreover, you have to define the database connection details in {KETTLE_ROOT}/simple-jndi/jdbc.properties.&lt;/div&gt;&lt;br&gt;&lt;div&gt;Now let&amp;#39;s get started. I will only describe the main points. Please find below an overview of the job:&lt;/div&gt;&lt;div&gt;&lt;div id="zsii" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_238hfcwptd4_b" style="height:184px;width:498px"&gt;&lt;/div&gt;The flow is as follows:&lt;/div&gt;&lt;ol&gt;&lt;li&gt;We provide two parameters to this job: ${VAR_DWH} which is the JNDI name we want to use for our ETL job and ${VAR_ETL_FILE} which is unsurprisingly the name of the main ETL transformation that we want to use in this job. Press &lt;b&gt;CTRL+J&lt;/b&gt;&amp;nbsp;to see the job properties. Click on the &lt;i&gt;Parameters&lt;/i&gt;&amp;nbsp;tab to see these defined parameters. The idea is that these parameters are supplied on the command line when kitchen.sh is called (see S&lt;a href="http://diethardsteiner.blogspot.com/2011/03/pentaho-data-integration-scheduling-and.html" id="xi98" title="supplying command line arguments to Kettle"&gt;upplying command line arguments to Kettle&lt;/a&gt;&amp;nbsp;for more details).&lt;/li&gt;&lt;li&gt;The&amp;nbsp;&lt;i&gt;tr_get_jndi_properties&lt;/i&gt;&amp;nbsp;transformation reads the &lt;b&gt;jdbc.properties&lt;/b&gt;&amp;nbsp;file and extracts all the database connection details for the JDNI name defined in ${VAR_DWH}. To achieve this we use some &lt;b&gt;regular expressions&lt;/b&gt; (this technique is described in my &lt;a href="http://diethardsteiner.blogspot.com/2010/11/using-regular-expressions-with-pentah.html" id="nkj1" title="Using Regular Expressions with Pentaho Data Integration"&gt;Using Regular Expressions with Pentaho Data Integration&lt;/a&gt; tutorial). Note that at the end of this transformation we define the database name as a variable (&lt;i&gt;dwh_database&lt;/i&gt;).&lt;br&gt;&lt;div id="d:a9" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_239f4qcjn24_b" style="height:520.1797752808989px;width:648px"&gt;&lt;/div&gt;&lt;br&gt;&lt;/li&gt;&lt;li&gt;All data files for bulk upload have to be stored in /usr/local/Calpont/data/bulk/data/import. In this case we are a bit cautious and delete any old *.tbl file in this directory.&lt;/li&gt;&lt;li&gt;We execute our main ETL transformation (the filename is defined in ${VAR_ETL_FILE}). This transformation has to output a CSV file with the name &lt;i&gt;fact_impression.tbl&lt;/i&gt;&amp;nbsp;into /usr/local/Calpont/data/bulk/data/import. Make sure it is pipe delimited.&lt;/li&gt;&lt;li&gt;The next step prepares the &lt;b&gt;Infinidb job file&lt;/b&gt;. The &lt;i&gt;infinidb_colxml.sh &lt;/i&gt;&lt;b&gt;Shell script job entry&lt;/b&gt;&amp;nbsp;calls the external shell file&amp;nbsp;&lt;i&gt;infinidb_colxml.sh&lt;/i&gt;. This shell file includes the following:&lt;br&gt;&lt;br&gt;&lt;font color="#38761d" face="&amp;#39;Courier New&amp;#39;"&gt;rm -rf &amp;nbsp;/usr/local/Calpont/data/bulk/job/Job_9991.xml&lt;br&gt;[ -f /usr/local/Calpont/data/bulk/data/import/fact_impression.tbl ] &amp;amp;&amp;amp; &amp;nbsp;/usr/local/Calpont/bin/colxml &lt;font style="background-color:#ffe599"&gt;$1&lt;/font&gt; -j 9991 -t fact_impression&lt;/font&gt;&lt;br&gt;&lt;br&gt;This shell script basically deletes an existing &lt;b&gt;Infinidb job file&lt;/b&gt; and if fact_impression.tbl (this is the CSV output file of our main transformation) exists it will create a new Infinidb job file. Please find all the details about this in my tutorial &lt;a href="http://diethardsteiner.blogspot.com/2011/01/pentaho-data-integration-and-infinidb_01.html" id="en.." title="Pentaho Data Integration and Infinidb Series: Bulk Upload"&gt;Pentaho Data Integration and Infinidb Series: Bulk Upload&lt;/a&gt;. As you can see we define an argument $1 (highlighted in yellow in the above shell script). $1 will basically accept the first parameter supplied by Kettle, which is &lt;i&gt;dwh_database&lt;/i&gt;. Hence the order in which you specify the arguments in the &lt;b&gt;Shell script job entry&lt;/b&gt;&amp;nbsp;is really important.&lt;br&gt;Note that we define &lt;i&gt;dwh_database&lt;/i&gt; variable as an &lt;b&gt;argument&lt;/b&gt; in the Shell script job entry.&lt;br&gt;&lt;div id="f8j2" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_241r627z6cs_b" style="height:521.9481268011527px;width:648px"&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;The &lt;i&gt;Load Tables&lt;/i&gt;&amp;nbsp;&lt;b&gt;Shell script step&lt;/b&gt;&amp;nbsp;calls &lt;b&gt;cpimport&lt;/b&gt;&amp;nbsp;and initiates a bulk upload.&lt;/li&gt;&lt;li&gt;The last step is not really necessary, but here we delete all data files again in the bulk upload directory.&lt;/li&gt;&lt;/ol&gt;&lt;br&gt;As you can see, Kettle really offers powerful functionality. The important point is to keep in mind to only use shell scripts in cases when Kettle doesn&amp;#39;t provide a dedicated step or job entry.&lt;br&gt;&lt;br&gt;&lt;div&gt;If you want to learn more about Shell scripting, consider &lt;a href="http://www.freeos.com/guides/lsst/" id="f34y" title="this free book"&gt;this free book&lt;/a&gt;.&lt;br&gt;&lt;/div&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4527276399966185267-6261309472247997544?l=diethardsteiner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://diethardsteiner.blogspot.com/feeds/6261309472247997544/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://diethardsteiner.blogspot.com/2011/05/pentaho-data-integration-supplying.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4527276399966185267/posts/default/6261309472247997544'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4527276399966185267/posts/default/6261309472247997544'/><link rel='alternate' type='text/html' href='http://diethardsteiner.blogspot.com/2011/05/pentaho-data-integration-supplying.html' title='Pentaho Data Integration: Supplying Variables to Shell Scripts'/><author><name>Diethard Steiner</name><uri>https://profiles.google.com/101564429460248850938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4527276399966185267.post-8136204097301683704</id><published>2011-04-15T12:58:00.001-07:00</published><updated>2011-04-15T12:59:47.936-07:00</updated><title type='text'>Pentaho Data Integration: Excel Writer Step (Plugin)</title><content type='html'>&lt;b&gt;&lt;font size="4"&gt;Pentaho Data Integration (Kettle): Excel Writer Step&lt;/font&gt;&lt;/b&gt;&lt;br&gt;&lt;br&gt;One great thing about Kettle is that everybody with Java coding skills can just write a plugin for it and hence extend its functionality. One plugin that I want to highlight is Slawo&amp;#39;s &lt;b&gt;Excel Writer Step&lt;/b&gt; which in my opinion is extremely useful. Why?&amp;nbsp;&lt;br&gt;&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Quick and easy report creation&lt;/b&gt;: Design your report in Excel and tell the Excel Writer step where to place the data. Here&amp;#39;s a really cool feature: You can tell the step in which cell to place the data. So you can even use the step several times to write to different areas within the same spreadsheet. Learn how to do this be reading &lt;a href="http://type-exit.org/adventures-with-open-source-bi/2010/12/using-the-excel-writer-step/" id="tucb" title="Slawo&amp;#39;s excellent tutorial"&gt;Slawo&amp;#39;s excellent tutorial&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Report bursting can be now set up within Kettle&lt;/b&gt;: Imagine a scenario where each country manager only receives a report with data related to their country. You can set up a process now in Kettle that takes care of this.&lt;/li&gt;&lt;li&gt;There is always a business user who loves Excel above everything, even if you have the fanciest BI website. You can output reports to Excel using Pentaho Report Designer, but in this case the charts will only be images. If it is required to have native Excel charts, the Kettle Excel plugin in your best friend.&lt;/li&gt;&lt;/ul&gt;&lt;br&gt;You can download the Excel Writer Plugin from &lt;a href="http://type-exit.org/adventures-with-open-source-bi/kettle-plugins/excel-writer-plugin/" id="olql" title="here"&gt;here&lt;/a&gt;.&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4527276399966185267-8136204097301683704?l=diethardsteiner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://diethardsteiner.blogspot.com/feeds/8136204097301683704/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://diethardsteiner.blogspot.com/2011/04/pentaho-data-integration-excel-plugin.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4527276399966185267/posts/default/8136204097301683704'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4527276399966185267/posts/default/8136204097301683704'/><link rel='alternate' type='text/html' href='http://diethardsteiner.blogspot.com/2011/04/pentaho-data-integration-excel-plugin.html' title='Pentaho Data Integration: Excel Writer Step (Plugin)'/><author><name>Diethard Steiner</name><uri>https://profiles.google.com/101564429460248850938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4527276399966185267.post-5486209597697683313</id><published>2011-04-15T12:52:00.001-07:00</published><updated>2011-04-15T12:52:57.779-07:00</updated><title type='text'>SQLPower Wabit</title><content type='html'>&lt;h2&gt;&lt;b&gt;&lt;font size="4"&gt;SQLPower Wabit: Is it the one-reporting-tool-does-it-all solution?&lt;/font&gt;&lt;/b&gt;&lt;/h2&gt;&lt;br&gt;There are quite different kinds of reports: ranging from dashboard/high level summary reports to very granular data &amp;nbsp;tables spanning 20 or so pages.&amp;nbsp;&lt;br&gt;&lt;br&gt;&lt;div&gt;As a report designer you usually have to satisfy various clients&amp;#39; needs: The Operations guy wants have a very detailed report, the CEO a high level summary/dashboard style report and so on.&amp;nbsp;&lt;/div&gt;&lt;br&gt;&lt;div&gt;Now &lt;b&gt;Pentaho Report Designer&lt;/b&gt;&amp;nbsp;(PRD) is an excellent tool with millions of formatting options etc, but it is more geared towards a very granular/tabular output. If you want to create a dashboard style report, you have to use sub reports. You cannot currently design sub reports within the same window, which is quite inconvenient especially for layouting purposes. Plus every new report that you create has by default the reporting sections required for a table output style (report header, details, report footer) ... so what am I supposed to do if I only want to use one chart? Do I place it in the header, details or footer?&amp;nbsp;&lt;/div&gt;&lt;div&gt;I guess you know where I am getting to: Why not start with a blank canvas and let the user decide what reporting object(s) they want to use?&amp;nbsp;&lt;/div&gt;&lt;div&gt;As much as I like the Pentaho Report Designer for very granular reports, I still find it unexplainable why there is no functionality that allows dashboard style reports (it&amp;#39;s more of a user interface problem I guess). I am not talking about interactive dashboards like the ones offered by &lt;b&gt;Pentaho CDF &lt;/b&gt;(Community Dashboard Framework), just a combination of static charts, summary tables, crosstabs, etc.&amp;nbsp;&lt;/div&gt;&lt;br&gt;&lt;div&gt;While CDF has really great functionality, it&amp;#39;s not possible to email the dashboard report (imagine a scenario when the CEO is on holidays and wants his high level summary to be delivered by email).&amp;nbsp;&lt;/div&gt;&lt;br&gt;&lt;div&gt;I had a quick 5 minutes look at &lt;b&gt;iReport&lt;/b&gt; which seems to have the same shortcomings as PRD. So all of them were not really what I was looking for - the &lt;i&gt;one-reporting-tool-does-it-all&lt;/i&gt; solution. I kept on search and found &lt;b&gt;SQLPOWER Wabit&lt;/b&gt;:&lt;/div&gt;&lt;br&gt;&lt;div&gt;Reading the specs on their website, this just seemed to be the tool I was looking for. I installed it and within 5 minutes I had a dashboard style report created without even reading a manual (which tells a lot about the UI). My report sourced data from Mondrian for a crosstab, and from a MySQL DB for a chart and a summary table. I ddin&amp;#39;t have to be bother by using subreports, I could just place the required reporting objects on the canvas and I could use more than one data source as well for the report objects. Nice! Actually, very nice!&amp;nbsp;&lt;/div&gt;&lt;br&gt;&lt;div&gt;Coming back to the initial question: Is it the one-reporting-tool-does-it-all solution? For now SQLPower doesn&amp;#39;t seem to offer the millions of formatting options PDR and iReport have, but then it is only in version 1.3.4 and my report was quite nice looking for the 5 minutes I spend on it.&lt;/div&gt;&lt;br&gt;&lt;div&gt;Overall, SQLPOWER Wabit seems to be a very promising product (did I mention that there is an open source version?). It even offers a visual interface to query OLAP cubes. You can download it from &lt;a href="http://www.sqlpower.ca/page/wabit" id="erpb" title="here"&gt;here&lt;/a&gt;&amp;nbsp;and give it a test ride.&lt;/div&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4527276399966185267-5486209597697683313?l=diethardsteiner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://diethardsteiner.blogspot.com/feeds/5486209597697683313/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://diethardsteiner.blogspot.com/2011/04/sqlpower-wabit.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4527276399966185267/posts/default/5486209597697683313'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4527276399966185267/posts/default/5486209597697683313'/><link rel='alternate' type='text/html' href='http://diethardsteiner.blogspot.com/2011/04/sqlpower-wabit.html' title='SQLPower Wabit'/><author><name>Diethard Steiner</name><uri>https://profiles.google.com/101564429460248850938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4527276399966185267.post-7357380630392699586</id><published>2011-03-19T16:01:00.001-07:00</published><updated>2011-03-19T16:10:16.195-07:00</updated><title type='text'>Pentaho Data Integration: Scheduling and command line arguments</title><content type='html'>&lt;b&gt;&lt;font size="4"&gt;Pentaho Data Integration (Kettle): Command line arguments and scheduling&lt;/font&gt;&lt;/b&gt;&lt;br&gt;&lt;br&gt;&lt;b&gt;Tutorial Details&lt;/b&gt;&lt;br&gt;&lt;ul&gt;&lt;li&gt;Software: PDI/Kettle 4.1 (download &lt;a href="http://sourceforge.net/projects/pentaho/files/" id="nlz4" title="here"&gt;here&lt;/a&gt;), MySQL Server (download &lt;a href="http://www.mysql.com/downloads/" id="v7vd" title="here"&gt;here&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;Knowledge: Intermediate (To follow this tutorial you should have good knowledge of the software and hence not every single step will be described)&lt;/li&gt;&lt;li&gt;OS: Linux or Mac OS X&lt;/li&gt;&lt;li&gt;Tutorial files can be downloaded &lt;a href="http://docs.google.com/leaf?id=0B-yuO-Oixq4RMjFjNzJmNGMtMWEzOS00YTA4LWJmNzEtYTAxNWEyNjU5YTA1&amp;amp;hl=en_GB" id="lygl" title="here"&gt;here&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br&gt;&lt;div class="writely-toc" id="WritelyTableOfContents" toctype="none+none"&gt;&lt;ol class="writely-toc-none"&gt;&lt;li&gt;&lt;a href="#Approach_to_provide_arguments__7298692315816879" target="_self"&gt;Approach to provide arguments to one step in a transformation&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="#Approach_to_provide_arguments__03419365920126438" target="_self"&gt;Approach to provide arguments to more transformations and jobs&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="#Using_named_Parameters_4423419" target="_self"&gt;Using named Parameters&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="#Scheduling_a_job_on_Linux_7340_24994160421192646" target="_self"&gt;Scheduling a job on Linux&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;br&gt;&lt;div&gt;Once you tested your transformations and jobs there comes the time when you have to schedule them. You want to have a certain amount of flexibility when executing your Pentaho Data Integration/Kettle jobs and transformations. This is where command line arguments come in quite handy.&amp;nbsp;&lt;br&gt;&lt;br&gt;A quite common example is to provide the start and end date for a SQL query that imports the raw data. Kettle makes it very easy actually to set this up.&amp;nbsp;&lt;br&gt;&lt;h2&gt;&lt;a id="Approach_to_provide_arguments__7298692315816879" name="Approach_to_provide_arguments__7298692315816879"&gt;&lt;/a&gt;Approach to provide arguments to one step in a transformation&lt;/h2&gt;&lt;br&gt;&lt;div&gt;If you just need the arguments for one step only, then you can use the &lt;b&gt;Get&lt;/b&gt;&amp;nbsp;&lt;b&gt;System Info&lt;/b&gt;&amp;nbsp;step and create a hop to your &lt;b&gt;Database Input&lt;/b&gt;&amp;nbsp;step.&lt;/div&gt;&lt;br&gt;&lt;div&gt;We will be working with following data set:&lt;/div&gt;&lt;div id="i747" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_193g3x9t9fn_b" style="height:167px;width:334px"&gt;&lt;/div&gt;&lt;div id="vy9b" style="text-align:left"&gt;&lt;br&gt;&lt;/div&gt;&lt;div id="sssx" style="text-align:left"&gt;Open your favourite SQL Client (and start your MySQL server if it is not running yet) and issue following SQL statements:&lt;/div&gt;&lt;div id="i6r3" style="text-align:left"&gt;&lt;br&gt;&lt;/div&gt;&lt;div id="mqw_" style="text-align:left"&gt;&lt;div id="ymn:" style="text-align:left"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;USE&lt;/font&gt;&lt;/div&gt;&lt;div id="npyh" style="text-align:left"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;test&lt;/font&gt;&lt;/div&gt;&lt;div id="bxq3" style="text-align:left"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;;&lt;/font&gt;&lt;/div&gt;&lt;div id="t_kt" style="text-align:left"&gt;&lt;br&gt;&lt;/div&gt;&lt;div id="at:3" style="text-align:left"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;DROP TABLE IF EXISTS&lt;/font&gt;&lt;/div&gt;&lt;div id="bhy2" style="text-align:left"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;`sales`&lt;/font&gt;&lt;/div&gt;&lt;div id="k3q." style="text-align:left"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;;&lt;/font&gt;&lt;/div&gt;&lt;div id="j8xr" style="text-align:left"&gt;&lt;br&gt;&lt;/div&gt;&lt;div id="h9am" style="text-align:left"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;CREATE TABLE&lt;/font&gt;&lt;/div&gt;&lt;div id="ta57" style="text-align:left"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;`sales`&lt;/font&gt;&lt;/div&gt;&lt;div id="zxod" style="text-align:left"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;(&lt;/font&gt;&lt;/div&gt;&lt;div id="gbj6" style="text-align:left"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;`date` DATETIME,&lt;/font&gt;&lt;/div&gt;&lt;div id="h0t1" style="text-align:left"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;`product_type` VARCHAR(45),&lt;/font&gt;&lt;/div&gt;&lt;div id="fk8r" style="text-align:left"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;`sales` INT(255)&lt;/font&gt;&lt;/div&gt;&lt;div id="zlf3" style="text-align:left"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;)&lt;/font&gt;&lt;/div&gt;&lt;div id="h5o0" style="text-align:left"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;;&lt;/font&gt;&lt;/div&gt;&lt;div id="la0v" style="text-align:left"&gt;&lt;br&gt;&lt;/div&gt;&lt;div id="ade:" style="text-align:left"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;INSERT INTO&lt;/font&gt;&lt;/div&gt;&lt;div id="rs0q" style="text-align:left"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;`sales`&lt;/font&gt;&lt;/div&gt;&lt;div id="b2a1" style="text-align:left"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;VALUES&lt;/font&gt;&lt;/div&gt;&lt;div id="i1zf" style="text-align:left"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;(&amp;#39;2010-01-20 00:00:00&amp;#39;,&amp;#39;Shoes&amp;#39;,234),&lt;/font&gt;&lt;/div&gt;&lt;div id="a7mi" style="text-align:left"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;(&amp;#39;2010-01-20 00:00:00&amp;#39;,&amp;#39;Cheese&amp;#39;,456),&lt;/font&gt;&lt;/div&gt;&lt;div id="a684" style="text-align:left"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;(&amp;#39;2010-01-21 00:00:00&amp;#39;,&amp;#39;Shoes&amp;#39;,256),&lt;/font&gt;&lt;/div&gt;&lt;div id="gvv_" style="text-align:left"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;(&amp;#39;2010-01-21 00:00:00&amp;#39;,&amp;#39;Cheese&amp;#39;,156),&lt;/font&gt;&lt;/div&gt;&lt;div id="u6en" style="text-align:left"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;(&amp;#39;2010-01-22 00:00:00&amp;#39;,&amp;#39;Shoes&amp;#39;,535),&lt;/font&gt;&lt;/div&gt;&lt;div id="ldmw" style="text-align:left"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;(&amp;#39;2010-01-23 00:00:00&amp;#39;,&amp;#39;Cheese&amp;#39;,433)&lt;/font&gt;&lt;/div&gt;&lt;div id="y_z7" style="text-align:left"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;;&lt;/font&gt;&lt;/div&gt;&lt;div id="v786" style="text-align:left"&gt;&lt;br&gt;&lt;/div&gt;&lt;div id="ph0y" style="text-align:left"&gt;&lt;br&gt;&lt;/div&gt;&lt;div id="axsa" style="text-align:left"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;SELECT&lt;/font&gt;&lt;/div&gt;&lt;div id="lgdm" style="text-align:left"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;*&lt;/font&gt;&lt;/div&gt;&lt;div id="x-0s" style="text-align:left"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;FROM&lt;/font&gt;&lt;/div&gt;&lt;div id="zpny" style="text-align:left"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;`sales`&lt;/font&gt;&lt;/div&gt;&lt;div id="u_b6" style="text-align:left"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;;&lt;/font&gt;&lt;/div&gt;&lt;div id="zto8" style="text-align:left"&gt;&lt;br&gt;&lt;/div&gt;&lt;div id="cv8e" style="text-align:left"&gt;&lt;div id="nf8y" style="text-align:left"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;CREATE TABLE&lt;/font&gt;&lt;/div&gt;&lt;div id="yya8" style="text-align:left"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;`sales_staging`&lt;/font&gt;&lt;/div&gt;&lt;div id="cc:v" style="text-align:left"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;(&lt;/font&gt;&lt;/div&gt;&lt;div id="j7hz" style="text-align:left"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;`date` DATETIME,&lt;/font&gt;&lt;/div&gt;&lt;div id="t6o0" style="text-align:left"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;`product_type` VARCHAR(45),&lt;/font&gt;&lt;/div&gt;&lt;div id="ncbq" style="text-align:left"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;`sales` INT(255)&lt;/font&gt;&lt;/div&gt;&lt;div id="jj.5" style="text-align:left"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;)&lt;/font&gt;&lt;/div&gt;&lt;div id="ucg9" style="text-align:left"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;;&lt;/font&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;&lt;div&gt;Our goal is to provide the start and end date arguments to our SQL query.&lt;/div&gt;&lt;br&gt;Now let&amp;#39;s create our transformation:&lt;br&gt;&lt;ol&gt;&lt;li&gt;Open Kettle and create a new transformation&lt;/li&gt;&lt;li&gt;Drag and drop a&amp;nbsp;&lt;b&gt;Get System Info&lt;/b&gt;&amp;nbsp;step on the canvas. You can find it in the Input folder on the left hand side.&lt;/li&gt;&lt;li&gt;Double click on it and populate the names column in the grid with start_date and end_date.&lt;/li&gt;&lt;li&gt;For the type choose&amp;nbsp;&lt;i&gt;command line argument 1&lt;/i&gt;&amp;nbsp;and&amp;nbsp;&lt;i&gt;command line argument 2&lt;/i&gt;&amp;nbsp;respectively&lt;/li&gt;&lt;/ol&gt;&lt;div id="sas6" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_195smhqgwfh_b" style="height:279px;width:476px"&gt;&lt;/div&gt;&lt;br&gt;&lt;br&gt;Now add a &lt;b&gt;Table input&lt;/b&gt;&amp;nbsp;step and a &lt;b&gt;Table output &lt;/b&gt;step (we keep it very simple). Create hops between all these steps in the order that they were mentioned.&lt;br&gt;&lt;br&gt;&lt;div&gt;Double Click on the &lt;b&gt;Table Input&lt;/b&gt; step and populate the SQL field with the query shown below:&lt;/div&gt;&lt;br&gt;&lt;p class="p1"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;SELECT&lt;/font&gt;&lt;/p&gt;&lt;p class="p1"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;date&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p class="p2"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;, product_type&lt;/font&gt;&lt;/p&gt;&lt;p class="p2"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;, sales&lt;/font&gt;&lt;/p&gt;&lt;p class="p2"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;&lt;span class="s2"&gt;FROM&lt;/span&gt; sales&lt;/font&gt;&lt;/p&gt;&lt;p class="p1"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;WHERE&lt;/font&gt;&lt;/p&gt;&lt;p class="p1"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;&lt;font style="background-color:#ffd966"&gt;date&lt;span class="s1"&gt;&amp;gt;=? &lt;/span&gt;AND&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p class="p1"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;&lt;font style="background-color:#ffd966"&gt;date&lt;span class="s1"&gt;&amp;lt;?&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p class="p2"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;;&lt;/font&gt;&lt;/p&gt;&lt;p class="p2"&gt;&lt;br&gt;&lt;/p&gt;&lt;div&gt;You can feed the start and end date from the&amp;nbsp;&lt;b&gt;Get System Info&lt;/b&gt;&amp;nbsp;step to a&amp;nbsp;&lt;b&gt;Table Input&lt;/b&gt;&amp;nbsp;step and use the start and end date in the WHERE clause of your SQL query (highlighted in yellow). The question marks will be replaced on execution by the start and end date (but make sure they are defined in this order in the &lt;b&gt;Get System Info&lt;/b&gt; step).&amp;nbsp;&lt;/div&gt;&lt;br&gt;&lt;div&gt;Make sure that you enable&amp;nbsp;&lt;i&gt;Replace variables in script?&lt;/i&gt;&amp;nbsp;and choose the Get System Info step for&amp;nbsp;&lt;i&gt;Insert data from step&lt;/i&gt;.&amp;nbsp;&lt;/div&gt;&lt;br&gt;&lt;div&gt;Define a&amp;nbsp;&lt;i&gt;New ...&lt;/i&gt;&amp;nbsp;connection (Connection Name: Localhost, Connection Type: MySQL, Host Name: localhost, Database Name: test, Port Number: 3306, your user name and password).&lt;/div&gt;&lt;br&gt;&lt;div&gt;Click &lt;i&gt;OK&lt;/i&gt;. The hop between the&amp;nbsp;&lt;b&gt;Get System Info&lt;/b&gt;&amp;nbsp;step and the&amp;nbsp;&lt;b&gt;Table Input&amp;nbsp;&lt;/b&gt;step now also displays an info icon.&lt;/div&gt;&lt;br&gt;&lt;div id="l-3r" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_191g6xk36fk_b" style="height:514px;width:531px"&gt;&lt;/div&gt;&lt;br&gt;&lt;p&gt;And this is all that you have to do: Your transformation now accepts command line arguments!&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;So now let&amp;#39;s try to execute the transformation from the command line. Close all the files that we just created, then open your Terminal window.&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div id="rb0g" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_197c7vn8xd9_b" style="height:136.054px;width:648px"&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;My transformation is located in:&lt;/p&gt;&lt;p&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;/Users/diethardsteiner/Dropbox/Pentaho/Examples/PDI/command_line_arguments/tr_get_command_line_arguments.ktr&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;To execute a transformation from the command line, we have to call pan.sh, which is located in my case in:&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;/Applications/Dev/PDI\ 4.1\ RC1/pan.sh&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;Use following approach to execute the transformation (replace the file paths by yours):&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;Change to the PDI directory:&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;cd /Applications/Dev/PDI\ 4.1\ RC1/&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;Use the super user and provide the password:&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;sudo su&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;Issue following command (replace yellow highlighted paths with your paths):&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;./pan.sh&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;-file=&amp;#39;&lt;font style="background-color:#ffd966"&gt;/Users/diethardsteiner/Dropbox/Pentaho/Examples/&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font style="background-color:#ffd966"&gt;PDI/command_line_arguments/tr_get_command_line_arguments.ktr&lt;/font&gt;&amp;#39; &lt;font style="background-color:#e06666"&gt;&amp;#39;2010-01-20 00:00:00&amp;#39;&lt;/font&gt; &lt;font style="background-color:#e06666"&gt;&amp;#39;2010-01-22 00:00:00&amp;#39;&lt;/font&gt; &lt;font style="background-color:#9fc5e8"&gt;-Level=Basic&lt;/font&gt; &amp;gt; &lt;font style="background-color:#ffd966"&gt;/Users/diethardsteiner/&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font style="background-color:#ffd966"&gt;Dropbox/Pentaho/Examples/PDI/command_line_arguments/tr_get_command_line_arguments.err.log&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;Command line parameters (highlighted in red) have to be mentioned after the file argument. Mention them in the order that you expect them to be received in Kettle. The level argument (highlighted in blue) specifies the logging level. Following levels are available (from the most detailed one to the least detailed one): Rowlevel, Detailed, Debug, Basic, Minimal, Error, Nothing.&lt;br&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;Pan accepts many more arguments, i.e. to connect to the repository. Please have a look at the &lt;a href="http://wiki.pentaho.com/display/EAI/Pan+User+Documentation" id="g:6w" title="Pan User Documentation"&gt;Pan User Documentation&lt;/a&gt; for all the details.&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;Once the command is issued and you get no error message returned (check the error file), let&amp;#39;s check the data that got exported to our output table:&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div id="ttup" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_198gjr98jhb_b" style="height:237px;width:284px"&gt;&lt;/div&gt;As you can see from the screenshot above, only the data covering our specified timeframe got processed.&lt;/div&gt;&lt;br&gt;&lt;h2&gt;&lt;a id="Approach_to_provide_arguments__03419365920126438" name="Approach_to_provide_arguments__03419365920126438"&gt;&lt;/a&gt;&lt;font size="4"&gt;&lt;b&gt;Approach to provide arguments to more transformations and jobs&lt;/b&gt;&lt;/font&gt;&lt;/h2&gt;&lt;div&gt;If you plan to use the command line arguments in more than one step and/or more transformations, the important point is that you will have to do this in a separate transformation which has to be executed before the transformation(s) that require(s) these variables. Let&amp;rsquo;s call this transformation &lt;b&gt;Set Variables&lt;/b&gt;.&lt;/div&gt;&lt;br&gt;The &lt;i&gt;Set Variables&lt;/i&gt; transformation has two steps:&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Get System Info&lt;/b&gt;: It allows you to define variables that are expected to come from the command line&lt;/li&gt;&lt;li&gt;&lt;b&gt;Set Variables&lt;/b&gt;: This one will then set the variables for the execution within Kettle, so that you can use them in the next transformation that is specified in your job.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;br&gt;&lt;table bgcolor="#eeeeee" border="1" bordercolor="#999999" cellpadding="3" cellspacing="0" id="n560" width="100%"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td width="100%"&gt;&lt;font color="#cc0000"&gt;&lt;b&gt;Note:&lt;/b&gt;&amp;nbsp;&lt;/font&gt;The command line arguments enter Kettle as a String. In some cases the variable is expected to be of a certain data type. Then you will have to use the&lt;i&gt; Get Variable &lt;/i&gt;step in a succeeding transformation to define the specific data type for each variable.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br&gt;There is no additional adjustment needed. Do not fill out the Parameters tab in the Transformation properties or Job properties with these variables!&lt;br&gt;&lt;br&gt;We can now change our main transformation to make use of these variables.&lt;br&gt;&lt;br&gt;&lt;div&gt;A typical scenario would be the following: Our ETL process populates a data warehouse (DWH). Before we insert the compiled data into the DWH, we want to make sure that the same data doesn&amp;#39;t already exist in it. Hence we decide, that we just want to execute a delete statement that clears the way before we add the newly compiled data.&lt;/div&gt;&lt;br&gt;&lt;div&gt;Our ETL job will do this:&lt;/div&gt;&lt;ol&gt;&lt;li&gt;Initialise the variables that are used through the job (done in a dedicated transformation)&lt;/li&gt;&lt;li&gt;Delete any existing DWH entries for the same time period (done in a SQL job entry)&lt;/li&gt;&lt;li&gt;Main ETL transformation&lt;/li&gt;&lt;/ol&gt;&lt;br&gt;Let&amp;#39;s start:&lt;br&gt;&lt;br&gt;&lt;ol&gt;&lt;li&gt;Create a new transformation and call it &lt;i&gt;tr_set_variables.ktr&lt;/i&gt;&lt;/li&gt;&lt;li&gt;Drag and drop a&amp;nbsp;&lt;b&gt;Get System Info&lt;/b&gt;&amp;nbsp;step on the canvas. You can find it in the Input folder on the left hand side.&lt;/li&gt;&lt;li&gt;Double click on it and populate the names column in the grid with start_date and end_date.&lt;/li&gt;&lt;li&gt;For the type choose&amp;nbsp;&lt;i&gt;command line argument 1&lt;/i&gt;&amp;nbsp;and&amp;nbsp;&lt;i&gt;command line argument 2&lt;/i&gt;&amp;nbsp;respectively&lt;/li&gt;&lt;li&gt;Next drag and drop the &lt;b&gt;Set Variables&amp;nbsp;&lt;/b&gt;step from the &lt;i&gt;Job&lt;/i&gt;&amp;nbsp;Folder onto the canvas and create a hop from the &lt;i&gt;Get System Info &lt;/i&gt;step to this one.&lt;/li&gt;&lt;li&gt;Double click the &lt;b&gt;Set Variables&lt;/b&gt; step and click on &lt;i&gt;Get Fields&lt;/i&gt;:&lt;br&gt;&lt;div id="um9v" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_229d4vr4bf8_b" style="height:287.40495867768595px;width:648px"&gt;&lt;/div&gt;Clicking &lt;i&gt;Get Fields &lt;/i&gt;will automatically define all input fields as variables. If you don&amp;#39;t need all, just delete the relevant rows. In our case we want to keep all of them. Kettle will also automatically capitalize the variable names. As I want to avoid any confusion later on, I explicitly prefix my variables in Kettle with &lt;i&gt;VAR_&lt;/i&gt;. You can also define scope type and set a default value.&lt;/li&gt;&lt;/ol&gt;&lt;br&gt;We have now create a transformation that accepts command line arguments and sets them as variables for the whole job. &amp;nbsp;&lt;br&gt;&lt;br&gt;&lt;div&gt;Next, let&amp;#39;s create the main ETL transformation:&lt;/div&gt;&lt;ol&gt;&lt;li&gt;Open &lt;i&gt;tr_get_command_line_arguments&lt;/i&gt;&amp;nbsp;(which we created earlier on) and save it as &lt;i&gt;tr_populate_staging_tables.&amp;nbsp;&lt;/i&gt;&amp;nbsp;&lt;/li&gt;&lt;li&gt;Delete the &lt;i&gt;Get System Info&lt;/i&gt;&amp;nbsp;step. We don&amp;#39;t need this step any more as we define the variables already in&lt;i&gt;&amp;nbsp;tr_set_variables&lt;/i&gt;.&lt;/li&gt;&lt;li&gt;Double click the &lt;i&gt;Table input &lt;/i&gt;step. As our variable can be referenced by names, we have to replace the question marks (?) with our variable names like this:&lt;br&gt;&lt;br&gt;&lt;p class="p1"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;SELECT&lt;/font&gt;&lt;/p&gt;&lt;p class="p1"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;&lt;span class="s1"&gt;&amp;nbsp; &lt;/span&gt;date&lt;/font&gt;&lt;/p&gt;&lt;p class="p2"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;, product_type&lt;/font&gt;&lt;/p&gt;&lt;p class="p2"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;, sales&lt;/font&gt;&lt;/p&gt;&lt;p class="p2"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;&lt;span class="s2"&gt;FROM&lt;/span&gt; sales&lt;/font&gt;&lt;/p&gt;&lt;p class="p1"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;WHERE&lt;/font&gt;&lt;/p&gt;&lt;p class="p2" style="margin-left:0px;margin-right:0px"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;&lt;span class="s2"&gt;date&lt;/span&gt;&amp;gt;=&lt;/font&gt;&lt;font face="&amp;#39;Courier New&amp;#39;"&gt;&lt;font color="#38761D"&gt;&lt;font style="background-color:#ffd966"&gt;&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font color="#38761d"&gt;&lt;font style="background-color:#ffd966"&gt;${VAR_START_DATE}&amp;quot;&lt;/font&gt;&lt;/font&gt;&amp;nbsp;&lt;span class="s2"&gt;&lt;font color="#38761d"&gt;AND&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;p class="p2"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;span class="s2"&gt;date&lt;/span&gt;&amp;lt;&lt;font style="background-color:#ffd966"&gt;&amp;quot;&lt;/font&gt;&lt;font style="background-color:#ffd966"&gt;$&lt;/font&gt;&lt;font style="background-color:#ffd966"&gt;{VAR_END_DATE}&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p class="p2"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;;&lt;/font&gt;&lt;/p&gt;&lt;p class="p2"&gt;&lt;br&gt;&lt;/p&gt;&lt;p class="p2"&gt;&lt;font face="verdana"&gt;&lt;font color="#000000"&gt;The variables are now enclosed by quotation marks as we want the date to be treated as string.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;br&gt;&lt;/li&gt;&lt;li&gt;Click &lt;i&gt;Ok &lt;/i&gt;and save the transformation.&lt;br&gt;&lt;br&gt;&lt;/li&gt;&lt;/ol&gt;As we have our transformations finished now, we can start creating a job that executes our transformations in a defined order (We will keep this job rather simple. I suggest adding error handling):&lt;br&gt;&lt;ol&gt;&lt;li&gt;Create a new job and name it &lt;i&gt;jb_populate_staging_tables&lt;/i&gt;.&lt;/li&gt;&lt;li&gt;Insert following job entries in the order specified and connect them with hops:&lt;/li&gt;&lt;ol&gt;&lt;li&gt;&lt;i&gt;Start &lt;/i&gt;entry&lt;/li&gt;&lt;li&gt;&lt;i&gt;Tranformation&lt;/i&gt;&amp;nbsp;entry: Double click on it and choose &lt;i&gt;tr_set_variables.ktr &lt;/i&gt;as the &lt;i&gt;Transformation filename&lt;/i&gt;.&lt;/li&gt;&lt;li&gt;From the &lt;i&gt;Script&lt;/i&gt;&amp;nbsp;Folder choose the &lt;i&gt;Execute SQL script ...&lt;/i&gt;&amp;nbsp;job entry: Define a &lt;i&gt;New ...&lt;/i&gt; connection (Connection Name: Localhost, Connection Type: MySQL, Host Name: localhost, Database Name: test, Port Number: 3306, your user name and password). Tick &lt;i&gt;Use variable substitution?&lt;/i&gt;. Insert following query:&lt;br&gt;&lt;br&gt;&lt;p class="p1" style="margin-left:0px;margin-right:0px"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;DELETE FROM&lt;br&gt;sales_staging&lt;/font&gt;&lt;/p&gt;&lt;p class="p1" style="margin-left:0px;margin-right:0px"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;WHERE&lt;/font&gt;&lt;/p&gt;&lt;p class="p2" style="margin-left:0px;margin-right:0px"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;&lt;span class="s2"&gt;date&lt;/span&gt;&amp;gt;=&lt;/font&gt;&lt;font face="&amp;#39;Courier New&amp;#39;"&gt;&lt;font color="#38761D"&gt;&lt;font style="background-color:#ffd966"&gt;&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font color="#38761d"&gt;&lt;font style="background-color:#ffd966"&gt;${VAR_START_DATE}&amp;quot;&lt;/font&gt;&lt;/font&gt;&amp;nbsp;&lt;span class="s2"&gt;&lt;font color="#38761d"&gt;AND&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;p class="p2" style="margin-left:0px;margin-right:0px"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;&lt;span class="s2"&gt;date&lt;/span&gt;&amp;lt;&lt;font style="background-color:#ffd966"&gt;&amp;quot;&lt;/font&gt;&lt;font style="background-color:#ffd966"&gt;$&lt;/font&gt;&lt;font style="background-color:#ffd966"&gt;{VAR_END_DATE}&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p class="p2" style="margin-left:0px;margin-right:0px"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;;&lt;/font&gt;&lt;/p&gt;&lt;br&gt;Pay attention to the where clause: The variables are now enclosed by quotation marks as we want the date to be treated as string. Also note that the date restriction is exactly the same as the one we use for the raw data import.&lt;/li&gt;&lt;li&gt;&lt;i&gt;Transformation &lt;/i&gt;entry: Double click on it and choose&amp;nbsp;&lt;i&gt;tr_populate_staging_tables.ktr&amp;nbsp;&lt;/i&gt;as the&amp;nbsp;&lt;i&gt;Transformation filename&lt;/i&gt;.&lt;/li&gt;&lt;/ol&gt;&lt;/ol&gt;&lt;div id="mfzt" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_231zsf3wmhs_b" style="height:479px;width:576px"&gt;&lt;/div&gt;&lt;p style="margin-left:0px;margin-right:0px"&gt;So now let&amp;#39;s try to execute the transformation from the command line. Close all the files that we just created, then open your Terminal window.&lt;/p&gt;&lt;p style="margin-left:0px;margin-right:0px"&gt;&lt;br&gt;&lt;/p&gt;&lt;p style="margin-left:0px;margin-right:0px"&gt;&lt;/p&gt;&lt;p style="margin-left:0px;margin-right:0px"&gt;&lt;/p&gt;&lt;p style="margin-left:0px;margin-right:0px"&gt;My job is located in:&lt;/p&gt;&lt;p style="margin-left:0px;margin-right:0px"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;/Users/diethardsteiner/Dropbox/Pentaho/Examples/PDI/command_line_arguments/jb_populate_staging_tables.kjb&lt;/font&gt;&lt;/p&gt;&lt;p style="margin-left:0px;margin-right:0px"&gt;&lt;br&gt;&lt;/p&gt;&lt;p style="margin-left:0px;margin-right:0px"&gt;To execute a job from the command line, we have to call kitchen.sh, which is located in my case in:&lt;/p&gt;&lt;p style="margin-left:0px;margin-right:0px"&gt;&lt;br&gt;&lt;/p&gt;&lt;p style="margin-left:0px;margin-right:0px"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;/Applications/Dev/PDI\ 4.1\ RC1/pan.sh&lt;/font&gt;&lt;/p&gt;&lt;p style="margin-left:0px;margin-right:0px"&gt;&lt;br&gt;&lt;/p&gt;&lt;p style="margin-left:0px;margin-right:0px"&gt;Use following approach to execute the transformation (replace the file paths by yours):&lt;/p&gt;&lt;p style="margin-left:0px;margin-right:0px"&gt;&lt;br&gt;&lt;/p&gt;&lt;p style="margin-left:0px;margin-right:0px"&gt;Change to the PDI directory:&lt;/p&gt;&lt;p style="margin-left:0px;margin-right:0px"&gt;&lt;br&gt;&lt;/p&gt;&lt;p style="margin-left:0px;margin-right:0px"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;cd /Applications/Dev/PDI\ 4.1\ RC1/&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p style="margin-left:0px;margin-right:0px"&gt;&lt;br&gt;&lt;/p&gt;&lt;p style="margin-left:0px;margin-right:0px"&gt;Use the super user and provide the password:&lt;/p&gt;&lt;p style="margin-left:0px;margin-right:0px"&gt;&lt;br&gt;&lt;/p&gt;&lt;p style="margin-left:0px;margin-right:0px"&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;sudo su&lt;/font&gt;&lt;/p&gt;&lt;p style="margin-left:0px;margin-right:0px"&gt;&lt;br&gt;&lt;/p&gt;&lt;p style="margin-left:0px;margin-right:0px"&gt;Issue following command (replace yellow highlighted paths with your paths):&lt;/p&gt;&lt;p style="margin-left:0px;margin-right:0px"&gt;&lt;br&gt;&lt;/p&gt;&lt;p style="margin-left:0px;margin-right:0px"&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;./kitchen.sh&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;-file=&amp;#39;&lt;font style="background-color:#ffd966"&gt;/Users/diethardsteiner/Dropbox/Pentaho/Examples/&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font style="background-color:#ffd966"&gt;PDI/command_line_arguments/jb_populate_staging_tables.kjb&lt;/font&gt;&lt;/font&gt;&lt;font color="#38761D"&gt;&amp;#39;&amp;nbsp;&lt;/font&gt;&lt;font color="#38761d"&gt;&lt;font style="background-color:#e06666"&gt;&amp;#39;2010-01-20 00:00:00&amp;#39;&lt;/font&gt;&lt;/font&gt;&amp;nbsp;&lt;font color="#38761d"&gt;&lt;font style="background-color:#e06666"&gt;&amp;#39;2010-01-22 00:00:00&amp;#39;&lt;/font&gt;&lt;/font&gt;&amp;nbsp;&lt;font color="#38761d"&gt;&lt;font style="background-color:#9fc5e8"&gt;-Level=Basic&lt;/font&gt;&lt;/font&gt;&lt;font color="#38761D"&gt;&amp;nbsp;&amp;gt;&amp;nbsp;&lt;/font&gt;&lt;font color="#38761D"&gt;&lt;font style="background-color:#ffd966"&gt;/Users/diethardsteiner&lt;/font&gt;&lt;/font&gt;&lt;font style="background-color:#ffd966"&gt;&lt;font color="#38761D"&gt;/&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font style="background-color:#ffd966"&gt;&lt;font color="#38761D"&gt;Dropbox/Pentaho/Examples/PDI/command_line_arguments/jb_populate_staging_tables.err.log&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p style="margin-left:0px;margin-right:0px"&gt;&lt;br&gt;&lt;/p&gt;Command line parameters (highlighted in red) have to be mentioned after the file argument. Mention them in the order that you expect them to be received in Kettle. The level argument (highlighted in blue) specifies the logging level. Following levels are available (from the most detailed one to the least detailed one): Rowlevel, Detailed, Debug, Basic, Minimal, Error, Nothing.&lt;br&gt;&lt;p style="margin-left:0px;margin-right:0px"&gt;&lt;br&gt;&lt;/p&gt;&lt;p style="margin-left:0px;margin-right:0px"&gt;Kitchen accepts many more arguments, i.e. to connect to the repository. Please have a look at the&amp;nbsp;&lt;a href="http://wiki.pentaho.com/display/EAI/Kitchen+User+Documentation" id="kmi2" title="Kitchen User Documentation"&gt;Kitchen User Documentation&lt;/a&gt;&amp;nbsp;for all the details.&lt;/p&gt;&lt;p style="margin-left:0px;margin-right:0px"&gt;&lt;br&gt;&lt;/p&gt;&lt;p style="margin-left:0px;margin-right:0px"&gt;Inspect the error log to see if the job ran successfully. Then have a look at the staging table to see if the data got imported.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;h2&gt;&lt;a id="Using_named_Parameters_4423419" name="Using_named_Parameters_4423419"&gt;&lt;/a&gt;Using named Parameters&lt;/h2&gt;Named parameters are special in the sense that they are explicitly named command line arguments. If you pass on a lot of arguments to your Kettle job or transformation, it might help to assign those values to an explicitly named parameter.&amp;nbsp;&lt;br&gt;&lt;br&gt;&lt;div&gt;Named Parameters have following advantages:&lt;/div&gt;&lt;ul&gt;&lt;li&gt;On the command line you assign the value directly to a parameter, hence there is zero chance of a mix-up.&lt;/li&gt;&lt;li&gt;A default value can be defined for a named parameter&lt;/li&gt;&lt;li&gt;A description can be provided for a named parameter&lt;/li&gt;&lt;li&gt;No need for an additional transformation that sets the variables for the job&lt;/li&gt;&lt;/ul&gt;&lt;br&gt;&lt;p&gt;Let&amp;#39;s reuse the job that we created in the previous example:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Open &lt;i&gt;jb_populate_staging_tables.kjb&lt;/i&gt;&amp;nbsp;and save it as &lt;i&gt;tr_populate_staging_tables_using_named_params.kjb&lt;/i&gt;.&lt;/li&gt;&lt;li&gt;Delete the &lt;i&gt;Set Variables&lt;/i&gt;&amp;nbsp;job entry and create a hub from the &lt;i&gt;Start&lt;/i&gt;&amp;nbsp;to the &lt;i&gt;Execute SQL script&amp;nbsp;&lt;/i&gt;entry.&lt;/li&gt;&lt;li&gt;Click CTRL+J to call the &lt;i&gt;Job properties &lt;/i&gt;dialog.&lt;/li&gt;&lt;li&gt;Click on the &lt;i&gt;Parameters&lt;/i&gt;&amp;nbsp;tab and specify the parameters like this:&lt;br&gt;&lt;div id="u2e7" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_232gvc3cdfh_b" style="height:309.6549618320611px;width:648px"&gt;&lt;/div&gt;In our case we don&amp;#39;t define a default value. The reason for this is that we don&amp;#39;t want to import any raw data in case there is no start and end date defined.&lt;br&gt;&lt;/li&gt;&lt;li&gt;Click &lt;i&gt;Ok &lt;/i&gt;and save the job.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;/p&gt;&lt;br&gt;Our job is completely set up. Let&amp;#39;s execute it on the command line:&lt;br&gt;&lt;br&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;./kitchen.sh -file=&amp;#39;/Users/diethardsteiner/Dropbox/Pentaho/Examples/PDI/command_line_arguments/jb_populate_staging_tables_using_named_params.kjb&amp;#39; &lt;font style="background-color:#ffd966"&gt;-param:VAR_START_DATE=&amp;#39;2010-01-20 00:00:00&amp;#39; -param:VAR_END_DATE=&amp;#39;2010-01-22 00:00:00&amp;#39;&lt;/font&gt; -Level=Basic &amp;gt; /Users/diethardsteiner/Dropbox/Pentaho/Examples/PDI/command_line_arguments/jb_populate_staging_tables_using_named_params.err.log&lt;/font&gt;&lt;/div&gt;&lt;br&gt;&lt;div&gt;I described the various kitchen arguments in the previous section, so I won&amp;#39;t repeat it here. The only difference here are the named parameters (highlighted in yellow).&lt;/div&gt;&lt;br&gt;&lt;div&gt;Inspect the error log to see if the job ran successfully. Then have a look at the staging table to see if the data got imported.&lt;/div&gt;&lt;br&gt;&lt;div&gt;As you can see, named parameters are the cr&amp;egrave;me de la cr&amp;egrave;me!&lt;/div&gt;&lt;br&gt;&lt;h2&gt;&lt;a id="Scheduling_a_job_on_Linux_7340_24994160421192646" name="Scheduling_a_job_on_Linux_7340_24994160421192646"&gt;&lt;/a&gt;Scheduling a job on Linux&lt;/h2&gt;Now that we have quite intensively explored the possibilites of passing command line arguments to Kettle, it&amp;#39;s time to have a look at scheduling:&lt;br&gt;&lt;br&gt;On Linux crontab is a popular utility that allows to schedule processes. I will not explain crontab here, if you are new to it and want to find out more about it, have a look&amp;nbsp;&lt;a href="http://adminschoice.com/crontab-quick-reference" id="oqr0" title="here"&gt;here&lt;/a&gt;.&amp;nbsp;&lt;br&gt;&lt;br&gt;&lt;div&gt;Our plan is to schedule a job to run every day at 23:00. We pass on two command line arguments to this job: the start and the end datetime. It&amp;#39;s required that this job imports each time the raw data of the last two days (23:00 to 23:00). To calculate the start and end date for the raw data processing we will write a shell script. The plan is to schedule this shell script using crontab.&lt;/div&gt;&lt;br&gt;&lt;div&gt;You can edit the crontab by issuing following command:&lt;/div&gt;&lt;br&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;crontab -e&amp;nbsp;&lt;/font&gt;&lt;/div&gt;&lt;br&gt;&lt;div&gt;This will display any scheduled processes. If you are familiar with &lt;i&gt;vi&lt;/i&gt;, you can use the same commands here to edit and save. Click &lt;i&gt;i&lt;/i&gt;&amp;nbsp;to insert the following:&lt;br&gt;&lt;br&gt;&lt;div&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;00 23 * * * /jb_populate_staging_tables_daily.sh&lt;/font&gt;&lt;/font&gt;&lt;br&gt;&lt;/div&gt;&lt;br&gt;&lt;div&gt;Press ESC followed by :wq to save and exit crontab.&lt;/div&gt;&lt;br&gt;&lt;div&gt;Navigate to the folder where you saved all the jobs and transformations. Create this shell script with &lt;i&gt;vi&lt;/i&gt;&amp;nbsp;and name it &lt;i&gt;jb_populate_staging_tables_daily.sh&lt;/i&gt;:&lt;/div&gt;&lt;br&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;cd /Applications/Dev/PDI\ 4.1\ RC1;./kitchen.sh -file=&amp;#39;/Users/diethardsteiner/Dropbox/Pentaho/Examples/PDI/command_line_arguments/jb_populate_staging_tables.kjb&amp;#39; &amp;quot;`date --date=&amp;#39;2 days ago&amp;#39; &amp;#39;+%Y-%m-%d 23:00:00&amp;#39;`&amp;quot; &amp;quot;`date --date=&amp;#39;1 day ago&amp;#39; &amp;#39;+%Y-%m-%d 23:00:00&amp;#39;`&amp;quot; -Level=Basic &amp;gt; populate_staging_tables_daily.err.log&lt;/font&gt;&lt;/div&gt;&lt;br class="Apple-interchange-newline"&gt;&lt;table bgcolor="#eeeeee" border="1" bordercolor="#999999" cellpadding="3" cellspacing="0" id="zu54" width="100%"&gt;&lt;tbody&gt;&lt;tr style="text-align:left"&gt;&lt;td width="100%"&gt;&lt;font color="#cc0000"&gt;&lt;b&gt;&lt;font size="3"&gt;Note:&lt;/font&gt;&lt;/b&gt;&lt;/font&gt;&lt;font size="3"&gt;&amp;nbsp;We enclosed our arguments with double quotes. We used enclosing back ticks to indicate that a shell command has to be executed. There is also a blank in our argument, which we enclosed by using single quotes (otherwise Linux is expecting another argument).&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br&gt;Our job is now scheduled. Make sure that you check after the first run for any errors.&lt;/div&gt;&lt;br&gt;&lt;div&gt;In this article you learnt about creating flexible jobs and transformations by using command line arguments. We also had a quick look at scheduling your jobs. I hope this article demonstrated that it is quite easy to set this up.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;/div&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4527276399966185267-7357380630392699586?l=diethardsteiner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://diethardsteiner.blogspot.com/feeds/7357380630392699586/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://diethardsteiner.blogspot.com/2011/03/pentaho-data-integration-scheduling-and.html#comment-form' title='18 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4527276399966185267/posts/default/7357380630392699586'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4527276399966185267/posts/default/7357380630392699586'/><link rel='alternate' type='text/html' href='http://diethardsteiner.blogspot.com/2011/03/pentaho-data-integration-scheduling-and.html' title='Pentaho Data Integration: Scheduling and command line arguments'/><author><name>Diethard Steiner</name><uri>https://profiles.google.com/101564429460248850938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>18</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4527276399966185267.post-7159943873121133303</id><published>2011-02-23T12:45:00.001-08:00</published><updated>2011-02-23T12:45:34.205-08:00</updated><title type='text'>Pentaho Data Integration: Designing a highly available scalable s</title><content type='html'>&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;p&gt;&lt;b&gt;&lt;font size="5"&gt;Pentaho Data Integration: Designing a highly available scalable solution for processing files&lt;/font&gt;&lt;/b&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p style="margin-left:0px;margin-right:0px"&gt;&lt;b&gt;Tutorial Details&lt;/b&gt;&lt;br&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;i&gt;Software&lt;/i&gt;: PDI/Kettle 4.1 (download&amp;nbsp;&lt;a href="http://sourceforge.net/projects/pentaho/files/" title="here"&gt;here&lt;/a&gt;) and MySQL server, both installed on your PC.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;Knowledge&lt;/i&gt;: Intermediate (To follow this tutorial you should have good knowledge of the software and hence not every single step will be described)&lt;p&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;Files&lt;/i&gt;: Download from &lt;a href="http://docs.google.com/leaf?id=0B-yuO-Oixq4RNGM5NWEwMjUtNmI3Mi00NTAwLTg0MjAtYmFjMmQwOGE4OTUw&amp;amp;hl=en_GB" id="z4q4" title="here"&gt;here&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="writely-toc" id="WritelyTableOfContents" toctype="none+none"&gt;&lt;ol class="writely-toc-none"&gt;&lt;li&gt;&lt;a href="#Preparation_45033828751184046_35482303355820477" target="_self"&gt;Preparation&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="#Set_up_slave_servers" target="_self"&gt;Set up slave servers&lt;/a&gt;&lt;/li&gt;&lt;ol class="writely-toc-none writely-toc-subheading" style="margin-left:0"&gt;&lt;li&gt;&lt;a href="#On_Windows_1906057596206665_3200138739775866" target="_self"&gt;On Windows&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="#On_Linux_8427329289261252_007176476065069437" target="_self"&gt;On Linux&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;li&gt;&lt;a href="#Define_Slave_Servers_601042471" target="_self"&gt;Define Slave Servers&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="#Monitor_Slave_Servers" target="_self"&gt;Monitor Slave Servers&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="#Distribution_of_the_workload_6" target="_self"&gt;Distribution of the workload&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="#Test_the_whole_process" target="_self"&gt;Test the whole process&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;br&gt;The raw data generated each year is increasing significantly. Nowadays we are dealing with huge amounts of data that have to be processed by our ETL jobs. Pentaho Data Integration/Kettle offers quite some interesting features that allow clustered processing of data. The goal of this session is to explain how to spread the ETL workload across multiple slave servers. Matt Casters originally provided the ETL files and background knowledge. My way to thank him is to provide this documentation.&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;i&gt;Note&lt;/i&gt;: This solutions runs ETL jobs on a cluster in parallel independently from each other. It&amp;#39;s like saying: Do exactly the same thing on another server without bothering what the other jobs do on the other servers. Kettle allows a different setup as well, where ETL processes running on different servers can send i.e. the result set to a master (so that all data is combined) for sorting and further processing (We will not cover this in this session).&amp;nbsp;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;h3&gt;Preparation&lt;/h3&gt;&lt;p&gt;Download the accompanying files from &lt;a href="http://docs.google.com/leaf?id=0B-yuO-Oixq4RNGM5NWEwMjUtNmI3Mi00NTAwLTg0MjAtYmFjMmQwOGE4OTUw&amp;amp;hl=en_GB" id="qa.y" title="here"&gt;here&lt;/a&gt; and extract them in a directory of your choice. Keep the folder structure as is, with the root folder named ETL. If you inspect the folders, you will see that there is:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;an &lt;i&gt;input&lt;/i&gt; directory, which stores all the files that our ETL process has to process&lt;/li&gt;&lt;li&gt;an&lt;i&gt; archive&lt;/i&gt; directory, which will store the processed files&lt;/li&gt;&lt;li&gt;a &lt;i&gt;PDI&lt;/i&gt; directory, which holds all the Kettle transformations and jobs&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Create the ETL_HOME variable in the kettle.properties file (which can be found in C:\Users\dsteiner\.kettle\kettle.properties)&lt;br&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;ETL_HOME=C\:\\ETL&lt;/font&gt;&lt;br&gt;&lt;br&gt;Adjust the directory path accordingly.&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;Navigate to the &lt;i&gt;simple-jndi&lt;/i&gt; folder in the &lt;i&gt;data-integration&lt;/i&gt; directory. Open jdbc.properties and add following lines at the end of the file (change if necessary):&lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;etl/type=javax.sql.DataSource&lt;br&gt;etl/driver=com.mysql.jdbc.Driver&lt;br&gt;etl/url=jdbc:mysql://localhost/etl&lt;br&gt;etl/user=root&lt;br&gt;etl/password=root&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;Next, start your local MySQL server and open your favourite SQL client. Run following statement:&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;CREATE SCHEMA etl;&lt;br&gt;USE etl;&lt;br&gt;CREATE TABLE FILE_QUEUE&lt;br&gt;(&lt;br&gt;filename VARCHAR(256)&lt;br&gt;, assigned_slave VARCHAR(256)&lt;br&gt;, finished_status VARCHAR(20)&lt;br&gt;, queued_date DATETIME&lt;br&gt;, started_date DATETIME&lt;br&gt;, finished_date DATETIME&lt;br&gt;)&lt;br&gt;;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;This table will allow us to keep track of the files that have to be processed.&lt;/p&gt;&lt;h3&gt;&lt;a id="Set_up_slave_servers" name="Set_up_slave_servers"&gt;&lt;/a&gt;&lt;font size="3"&gt;&lt;b&gt;&lt;b&gt;&lt;b&gt;Set up slave servers&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/font&gt;&lt;/h3&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;For the purpose of this exercise, we keep it simple and have all slaves running on localhost. Setting up a proper cluster is out of this scope of this tutorial.&lt;br&gt;Kettle comes with a lightweight web server called Carte. All that Carte does is listen to incoming job or transformation calls and process them. For more info about Carte have a look at my &lt;a href="http://diethardsteiner.blogspot.com/2011/01/pentaho-data-integration-remote.html" id="a5he" title="Carte tutorial"&gt;Carte tutorial&lt;/a&gt;.&lt;br&gt;So all we have to do now is to start our Carte instances:&lt;/p&gt;&lt;h4&gt;&lt;a id="On_Windows_1906057596206665_3200138739775866" name="On_Windows_1906057596206665_3200138739775866"&gt;&lt;/a&gt;On Windows&lt;/h4&gt;&lt;p&gt;On the command line, navigate to the data-integration directory within your PDI folder. Run following command:&lt;br&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;carte.bat localhost 8081&lt;/font&gt;&lt;/p&gt;&lt;br&gt;&lt;div id="dzog" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_2175n8gt4d6_b" style="height:269.9202363367799px;width:648px"&gt;&lt;/div&gt;&lt;br&gt;&lt;p&gt;Open a new command line window and do exactly the same, but now for port 8082.&amp;nbsp;&lt;br&gt;Do the same for port 8083 and 8084.&lt;/p&gt;&lt;h4&gt;&lt;a id="On_Linux_8427329289261252_007176476065069437" name="On_Linux_8427329289261252_007176476065069437"&gt;&lt;/a&gt;On Linux&lt;/h4&gt;&lt;p&gt;Open Terminal and navigate to the data-integration directory within your PDI folder. Run following command:&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;sh carte.sh localhost 8081&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;br&gt;Proceed by doing exactly the same, but now for ports 8082, 8083 and 8084.&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;Now that all our slave servers are running, we can have a look at the ETL process ...&lt;/p&gt;&lt;br&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="3"&gt;&lt;b&gt;Populate File Queue&lt;/b&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;br&gt;Start Kettle (spoon.bat or spoon.sh) and open &lt;i&gt;Populate file queue.ktr&lt;/i&gt; (You can find it in the &lt;i&gt;/ETL/PDI&lt;/i&gt; folder). If you have Kettle (Spoon) already running, restart it so that the changes can take effect and then open the file.&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;This transformation will get all filenames from the &lt;i&gt;input&lt;/i&gt; directory (of the files that haven&amp;#39;t been processed yet) and stores them in the FILE_QUEUE table.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;Double click on the &lt;i&gt;Get file names&lt;/i&gt; step and click &lt;i&gt;Show filename(s) &amp;hellip; &lt;/i&gt;. This should show all your file names properly:&lt;/p&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;div id="xy5y" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_227c3rxfrk5_b" style="height:495.6686967113277px;width:648px"&gt;&lt;/div&gt;&lt;br&gt;&lt;p&gt;Click &lt;i&gt;Close &lt;/i&gt;and then &lt;i&gt;OK&lt;/i&gt;.&lt;br&gt;Next, double click on the&lt;i&gt; Lookup entry in FILE_QUEUE&lt;/i&gt; step. Click on &lt;i&gt;Edit &lt;/i&gt;next to &lt;i&gt;Connection&lt;/i&gt;. Then click &lt;i&gt;Test &lt;/i&gt;to see if a working connection can be established (the connection details that you defined in the jdbc.properties file will be used):&lt;/p&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;div id="h_zi" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_228cw8433s2_b" style="height:675px;width:635px"&gt;&lt;/div&gt;&lt;font size="3"&gt;&lt;br&gt;&lt;/font&gt;&lt;p&gt;Click 3 times &lt;i&gt;OK&lt;/i&gt;.&lt;/p&gt;&lt;p&gt;&lt;br&gt;Everything should be configured now for this transformation, so hit the Play/Execute Button.&lt;/p&gt;&lt;p&gt;&lt;br&gt;In your favourite SQL Client run following query to see the records that were inserted by the transformation:&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;SELECT&lt;br&gt;*&lt;br&gt;FROM&lt;br&gt;FILE_QUEUE&lt;br&gt;;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div id="wfe5" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_222cvmtrdtq_b" style="height:112.86486486486486px;width:648px"&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;Once you inspected the results run:&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Courier New"&gt;&lt;font color="#38761D"&gt;&lt;span class="sql1-reservedword"&gt;DELETE&lt;/span&gt; &lt;span class="sql1-reservedword"&gt;FROM &lt;/span&gt;&lt;span class="sql1-identifier"&gt;FILE_QUEUE &lt;/span&gt;&lt;/font&gt;&lt;span class="sql1-symbol"&gt;&lt;font color="#38761D"&gt;;&lt;/font&gt;&amp;nbsp;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;The idea is that this process is scheduled to run continuously (every 10 seconds or so).&lt;/p&gt;&lt;/div&gt;&lt;h3&gt;&lt;a id="Define_Slave_Servers_601042471" name="Define_Slave_Servers_601042471"&gt;&lt;/a&gt;Define Slave Servers&lt;/h3&gt;First off, we will create a table that stores all the details about our slave servers. In your favourite SQL Client run following statement:&lt;br&gt;&lt;br&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;" size="2"&gt;CREATE TABLE SLAVE_LIST&lt;br&gt;(&lt;br&gt;id INT&lt;br&gt;, name VARCHAR(100)&lt;br&gt;, hostname VARCHAR(100)&lt;br&gt;, username VARCHAR(100)&lt;br&gt;, password VARCHAR(100)&lt;br&gt;, port VARCHAR(10)&lt;br&gt;, status_url VARCHAR(255)&lt;br&gt;, last_check_date DATETIME&lt;br&gt;, last_active_date DATETIME&lt;br&gt;, max_load INT&lt;br&gt;, last_load INT&lt;br&gt;, active CHAR(1)&lt;br&gt;, response_time INT&lt;br&gt;)&lt;/font&gt;&lt;br&gt;;&lt;br&gt;&lt;br&gt;&lt;p&gt;Open the &lt;i&gt;Initialize SLAVE_LIST&lt;/i&gt;&amp;nbsp;transformation in Kettle. The transformation allows to easily configure our slave server definition. We use the &lt;i&gt;Data Grid&lt;/i&gt;&amp;nbsp;step to define all the slave details:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;id&lt;/li&gt;&lt;li&gt;name&lt;/li&gt;&lt;li&gt;hostname&lt;/li&gt;&lt;li&gt;username&lt;/li&gt;&lt;li&gt;passoword&lt;/li&gt;&lt;li&gt;port&lt;/li&gt;&lt;li&gt;status_url&lt;/li&gt;&lt;li&gt;last_check_date: keep empty, will be populated later on&lt;/li&gt;&lt;li&gt;last_active_date: keep empty, will be populated later on&lt;/li&gt;&lt;li&gt;max_load&lt;/li&gt;&lt;li&gt;last_load: keep empty, will be populated later on&lt;/li&gt;&lt;li&gt;active&lt;/li&gt;&lt;li&gt;response_time: keep empty, will be populated later on&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;div id="n2g9" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_215fsxgcrc6_b" style="height:218.34782608695653px;width:648px"&gt;&lt;/div&gt;As you can see, we use an &lt;i&gt;Update&lt;/i&gt;&amp;nbsp;step: This allows us to basically change the configuration at any time in the &lt;i&gt;Data Grid &lt;/i&gt;step and then rerun the transformation.&lt;br&gt;&lt;br&gt;&lt;div&gt;Execute the transformation.&lt;/div&gt;&lt;br&gt;&lt;div&gt;Run following statement in your favourite SQL client :&lt;/div&gt;&lt;br&gt;&lt;div&gt;&lt;font color="#38761D" face="Courier New"&gt;&lt;span class="sql1-reservedword"&gt;SELECT &lt;/span&gt;&lt;span class="sql1-symbol"&gt;* &lt;/span&gt;&lt;span class="sql1-reservedword"&gt;FROM &lt;/span&gt;&lt;span class="sql1-identifier"&gt;SLAVE_LIST &lt;/span&gt;&lt;span class="sql1-symbol"&gt;; &lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;h3&gt;&lt;a id="Monitor_Slave_Servers" name="Monitor_Slave_Servers"&gt;&lt;/a&gt;&lt;font size="3"&gt;&lt;b&gt;Monitor Slave Servers&lt;/b&gt;&lt;/font&gt;&lt;/h3&gt;&lt;/div&gt;Features:&lt;br&gt;&lt;ul&gt;&lt;li&gt;Checks the status of the active slave servers defined in the SLAVE_LIST&lt;/li&gt;&lt;li&gt;Checks wether they are still active&lt;/li&gt;&lt;li&gt;Calculates the load (number of active jobs) per slave server&lt;/li&gt;&lt;li&gt;Calculates the response time&lt;/li&gt;&lt;/ul&gt;&lt;br&gt;Open following files in Kettle:&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Slave server status check.kjb&lt;/b&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Get SLAVE_LIST rows.ktr&lt;/b&gt;: Retrieves the list of defined slave servers (including all details) and copies rows the to the result set&lt;/li&gt;&lt;li&gt;&lt;b&gt;Update slave server status.kjb&lt;/b&gt;: This job gets executed for each input row (=loop)&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Set slave server variables.ktr&lt;/b&gt;: receives each time one input row coming from the result set of &lt;i&gt;Get SLAVE_LIST rows.ktr&lt;/i&gt;&amp;nbsp;and defines variables for each field, which can be used in the next transformation&lt;/li&gt;&lt;li&gt;&lt;b&gt;Check slave server.ktr&lt;/b&gt;:&amp;nbsp;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Checks whether the server is not available or status is 200 and then updates the SLAVE_LIST table with an inactive flag and last_check_date.&lt;/li&gt;&lt;li&gt;If the server is available:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;it extracts the amount of running jobs from the xml file returned by the server&lt;/li&gt;&lt;li&gt;keeps the response time&lt;/li&gt;&lt;li&gt;sets an active flag&lt;/li&gt;&lt;li&gt;sets the last_check_date and last_active_date (both derived from the system date)&amp;nbsp;&lt;/li&gt;&lt;li&gt;updates the SLAVE_LIST table with this info&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;br&gt;Please find below the combined screenshots of the jobs and transformation:&lt;br&gt;&lt;div id="j2e4" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_226g5tm3tfz_b" style="height:607.8274932614555px;width:648px"&gt;&lt;/div&gt;So let&amp;#39;s check if all our slave servers are available: Run &lt;i&gt;Slave server status check.kjb&lt;/i&gt;. Run the following statement in your favourite SQL client:&lt;br&gt;&lt;br&gt;&lt;div&gt;&lt;font color="#38761D" face="Courier New"&gt;&lt;span class="sql1-reservedword"&gt;SELECT &lt;/span&gt;&lt;span class="sql1-symbol"&gt;* &lt;/span&gt;&lt;span class="sql1-reservedword"&gt;FROM &lt;/span&gt;&lt;span class="sql1-identifier"&gt;SLAVE_LIST&lt;/span&gt;&lt;span class="sql1-symbol"&gt;; &lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;/div&gt;&lt;br&gt;&lt;p&gt;The result set should now look like on the screenshot below, indicating that all our slave servers are active:&lt;/p&gt;&lt;div id="j-sz" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_218fbqzdxfb_b" style="height:78.30256898192198px;width:648px"&gt;&lt;/div&gt;&lt;br&gt;&lt;h3&gt;&lt;a id="Distribution_of_the_workload_6" name="Distribution_of_the_workload_6"&gt;&lt;/a&gt;Distribution of the workload&lt;/h3&gt;&lt;p&gt;So far we know the names of the files to be processed and the available servers, so the next step is to create a job that processes one file from the queue on each available slave server.&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;Open &lt;i&gt;Process one queued file.kjb&lt;/i&gt;&amp;nbsp;in Kettle.&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;This job does the following:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;It checks if there are any slave servers available that can handle more work. This takes the current and maximum specified load (the number of active jobs) into account.&lt;/li&gt;&lt;li&gt;It loops over the available slave servers and processes one file on each server.&lt;br&gt;&lt;/li&gt;&lt;li&gt;In the case that no slave servers are available, it waits 20 seconds.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div id="imyo" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_219hcfbfwdv_b" style="height:271px;width:583px"&gt;&lt;/div&gt;&lt;br&gt;&lt;p&gt;&lt;/p&gt;Some more details about the job steps:&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Any slave servers available?&lt;/b&gt;: This fires a query against our SLAVE_LIST table which will return a count of the available slave servers. If the count is bigger than 0, &lt;i&gt;Select slave servers&lt;/i&gt;&amp;nbsp;is the next step in the process.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Select slave servers&lt;/b&gt;: This transformation retrieves a list of available slave servers from the SLAVE_LIST table and copies it to the result set.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Process a file&lt;/b&gt;: The important point here is that this job will be executed for each result set row (double click on the step, click on the &lt;i&gt;Advanced &lt;/i&gt;tab and you will see that &lt;i&gt;Execute for each input row&lt;/i&gt;&amp;nbsp;is checked).&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;br&gt;&lt;div&gt;Open &lt;i&gt;Process a file.kjb&lt;/i&gt;.&amp;nbsp;&lt;/div&gt;&lt;br&gt;&lt;div id="spw_" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_220g4dhc3dz_b" style="height:267.5750273822563px;width:648px"&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;This job does the following&lt;/b&gt;:&lt;/div&gt;&lt;ul&gt;&lt;li&gt;For each input row from the previous result set, it sets the slave server variables.&lt;/li&gt;&lt;li&gt;It checks if there are any files to be processed by firing a query against our FILE_QUEUE table.&lt;/li&gt;&lt;li&gt;It retrieves the name of the next file that has to be processed from the FILL_QUEUE table (a SQL query with the limit set to 1) and sets the file name as a variable&lt;/li&gt;&lt;li&gt;It updates the record for this file name in the FILE_QUEUE table with the start date and assigned slave name.&lt;/li&gt;&lt;li&gt;The &lt;i&gt;Load a file&lt;/i&gt;&amp;nbsp;job is started on the selected slave server : Replace the dummy Javascript step in this job with your normal ETL process that populates your data warehouse. Some additional hints:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;The file name is available in the ${FILENAME} variable. It might be quite useful to store the file name in the target staging table.&amp;nbsp;&lt;/li&gt;&lt;li&gt;In case the ETL process failed once before for this file, you can use this ${FILENAME} variable as well to automatically delete the corresponding record(s) from the FILE_QUEUE table and even the staging table prior to execution&lt;font color="#990000"&gt;.&lt;/font&gt;&amp;nbsp;&lt;/li&gt;&lt;li&gt;Note that the slave server is set in the &lt;i&gt;Job Settings &amp;gt; Advanced&lt;/i&gt; tab:&lt;br&gt;&lt;div id="ij7i" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_224gvfmjbdt_b" style="height:301.60789844851905px;width:648px"&gt;&lt;/div&gt;&lt;br&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;If the process is successful, the record in the FILE_QUEUE table gets flagged respectively. The same happens in case the process fails.&lt;/li&gt;&lt;/ul&gt;&lt;br&gt;&lt;h3&gt;&lt;a id="Test_the_whole_process" name="Test_the_whole_process"&gt;&lt;/a&gt;Test the whole process&lt;/h3&gt;&lt;div&gt;Let&amp;#39;s verify that everything is working: Open &lt;i&gt;Main Job.kjb &lt;/i&gt;in Kettle and click the &lt;i&gt;Execute &lt;/i&gt;icon.&lt;/div&gt;&lt;br&gt;Now let&amp;#39;s see if 4 files were moved to the &lt;i&gt;archive&lt;/i&gt;&amp;nbsp;folder:&lt;br&gt;&lt;div id="qvxj" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_221fb7tktht_b" style="height:161.83350462487155px;width:648px"&gt;&lt;/div&gt;&lt;br&gt;This looks good ... so let&amp;#39;s also check if our FILE_QUEUE table has been updated correctly. Run following statement in your favourite SQL client:&lt;br&gt;&lt;div id="nrtf" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_223c3dtzqhh_b" style="height:122.77894736842106px;width:648px"&gt;&lt;/div&gt;&lt;br&gt;Note that the last file (file5.csv) hasn&amp;#39;t been processed. This is because we set up 4 slave servers and our job is passing 4 files to each of the slave servers. The last file will be processed with the next execution.&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4527276399966185267-7159943873121133303?l=diethardsteiner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://diethardsteiner.blogspot.com/feeds/7159943873121133303/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://diethardsteiner.blogspot.com/2011/02/pentaho-data-integration-designing.html#comment-form' title='22 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4527276399966185267/posts/default/7159943873121133303'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4527276399966185267/posts/default/7159943873121133303'/><link rel='alternate' type='text/html' href='http://diethardsteiner.blogspot.com/2011/02/pentaho-data-integration-designing.html' title='Pentaho Data Integration: Designing a highly available scalable s'/><author><name>Diethard Steiner</name><uri>https://profiles.google.com/101564429460248850938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>22</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4527276399966185267.post-3904322662504209600</id><published>2011-02-15T07:39:00.001-08:00</published><updated>2011-02-18T03:16:29.782-08:00</updated><title type='text'>Pentaho Data Integration: Best practice solutions for working wit</title><content type='html'>&lt;h2&gt;Pentaho Data Integration: Best practice solutions for working with huge data sets&lt;/h2&gt;&lt;h3&gt;Assign enough memory&lt;/h3&gt;&lt;div&gt;Open &lt;a href="http://pan.sh/"&gt;pan.sh&lt;/a&gt; and &lt;a href="http://kitchen.sh/"&gt;kitchen.sh&lt;/a&gt; (and &lt;a href="http://spoon.sh/"&gt;spoon.sh&lt;/a&gt; if you use the GUI) in a text editor and assign as much memory as possible.&lt;br&gt;&lt;h2&gt;&lt;font size="3"&gt;&lt;b&gt;Data input&lt;/b&gt;&lt;/font&gt;&lt;/h2&gt;&lt;/div&gt;&lt;div&gt;Data from a database table can only be imported as fast as the database allows it. You cannot run multiple copies of a database table input step.&lt;br&gt;Text files are more convenient, as you can copy them across servers (your cluster) and read them in simultaneously. Another really cool feature that Kettle has is that you can read in text files in parallel (check the &amp;quot;Run in parallel&amp;quot; option in the step configuration and specify the number of copies to start with in the step context menu). How does this work? If your file has a size of 4 GB and you specified 4 copies of the text step, each step will read in chunks of that file at the same time (to be more precise: the first copy will start reading at the beginning of the file, the second copy will start at the first line that is found after 1 GB, the third copy will start at the first line that is found after 2 GB and so on).&lt;br&gt;&lt;h3&gt;Run multiple step copies (Scale up)&lt;/h3&gt;Find out first how many cores your server has, as it doesn&amp;rsquo;t make sense assigning more copies than there are cores available.&lt;br&gt;Linux: cat /proc/cpuinfo&lt;br&gt;Have a look how many times processor is mentioned. The first processor has the id 0. &lt;br&gt;&lt;br&gt;Make sure you test your transformations first! You might get unexpected results (see &lt;a href="http://diethardsteiner.blogspot.com/2010/12/be-careful-with-running-multiple-step.html"&gt;my other blog post&lt;/a&gt; for more details). &lt;br&gt;&lt;br&gt;Usually you should get better performance by specifying the same amount of copies for steps where possible (herewith you create dedicated data pipelines and Kettle doesn&amp;rsquo;t have to do the work of sending the rows in a round robin fashion to the other step copies).&lt;br&gt;&lt;h3&gt;Run a cluster (Scale out)&lt;/h3&gt;&lt;/div&gt;&lt;div&gt;You can run your ETL job on multiple slave servers. Kettle allows you to specify a cluster via the GUI. For this to work, you have to set up Carte first, which comes with PDI (see &lt;a href="http://diethardsteiner.blogspot.com/2011/01/pentaho-data-integration-remote.html"&gt;my other blog post&lt;/a&gt; for details).&lt;br&gt;Of course, you can combine scale out and scale up methods.&lt;br&gt;&lt;h3&gt;Adjust Sort Rows step&lt;/h3&gt;&lt;/div&gt;&lt;div&gt;Make sure you set a proper limit for Sort size (rows in memory) and/or maybe as well Free memory Threshold (in %).&lt;br&gt;&lt;br&gt;You can run the Sort Rows step in multiple copies, but make sure you add a Sorted Merge step after it. This one will combine and sort the results in a streaming fashion. &lt;/div&gt;&lt;br&gt;&lt;h3&gt;Use UDJC instead of Javascript&lt;/h3&gt;&lt;div&gt;Java code will execute faster than javascript, hence use the &lt;i&gt;User Definied Java Class &lt;/i&gt;step instead of the &lt;i&gt;Javascript&lt;/i&gt;&amp;nbsp;step where possible.&lt;/div&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4527276399966185267-3904322662504209600?l=diethardsteiner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://diethardsteiner.blogspot.com/feeds/3904322662504209600/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://diethardsteiner.blogspot.com/2011/02/pentaho-data-integration-best-practice_15.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4527276399966185267/posts/default/3904322662504209600'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4527276399966185267/posts/default/3904322662504209600'/><link rel='alternate' type='text/html' href='http://diethardsteiner.blogspot.com/2011/02/pentaho-data-integration-best-practice_15.html' title='Pentaho Data Integration: Best practice solutions for working wit'/><author><name>Diethard Steiner</name><uri>https://profiles.google.com/101564429460248850938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4527276399966185267.post-8123174970066947506</id><published>2011-02-04T14:14:00.003-08:00</published><updated>2011-02-04T14:14:27.552-08:00</updated><title type='text'>Pentaho Metadata Editor: Joining two fact tables</title><content type='html'>&lt;font size="4"&gt;&lt;b&gt;Pentaho Metadata Model: Joining two fact tables&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;p&gt;&lt;i&gt;This tutorial was possible with the help of &lt;a href="http://www.willgorman.com/" id="rl4k" title="Will Gorman"&gt;Will Gorman&lt;/a&gt;, Vice President of Engineering at Pentaho&lt;/i&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="writely-toc" id="WritelyTableOfContents" toctype="none+none"&gt;&lt;ol class="writely-toc-none"&gt;&lt;li&gt;&lt;a href="#The_data_9495587255805731_9662041438277811" target="_self"&gt;The data&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="#Metadata_Model_230571658583357" target="_self"&gt;Metadata Model&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="#My_Suggestions_2082723358180374" target="_self"&gt;My Suggestions&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;i&gt;&lt;br&gt;&lt;/i&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;i&gt;&lt;b&gt;Tutorial Details&lt;/b&gt;&lt;br&gt;&lt;/i&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;Software: PME 3.7 (download&amp;nbsp;&lt;a href="http://sourceforge.net/projects/pentaho/files/" title="here"&gt;here&lt;/a&gt;), a database of your liking, in example MySQL&lt;/i&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;Knowledge: Intermediate (To follow this tutorial you should have good knowledge of the software and hence not every single step will be described)&lt;/i&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;Tutorial files can be downloaded &lt;a href="http://docs.google.com/leaf?id=0B-yuO-Oixq4ROGM2Njc3ZjctMWY3MS00ZDVmLTk4MTEtNDYyMjQ4NDdkMTA2&amp;amp;hl=en_GB" id="qc.." title="here"&gt;here&lt;/a&gt;&lt;/i&gt;&lt;/li&gt;&lt;/ul&gt;&lt;i&gt;&lt;br&gt;&lt;/i&gt;&lt;p&gt;&lt;/p&gt;The Pentaho Metadata layer is amazing: It allows end users to build reports without actually writing a line of SQL. Database and/or table changes can be easily accommodated by only changing the references in the metadata model and hence report, dashboards, etc stay unaffected.&amp;nbsp;&lt;br&gt;&lt;br&gt;&lt;div&gt;While it is fairly easy to set up a metadata model with one fact table (and some dimensions), using more than one fact table (which also might have different granularity) posses a challenge for many users. Is it really possible to do this in &lt;b&gt;PME&lt;/b&gt; (Pentaho Metadata Editor)? The answer is yes, although in the current version I don&amp;#39;t consider it to be an ideal solution and I hope that in future it will be possible to visually design this in the relationship diagram.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;In this session I&amp;#39;d like to discuss the approach of integrating more than one fact table into your metadata model.&amp;nbsp;&lt;/div&gt;&lt;br&gt;&lt;h2&gt;&lt;a id="The_data_9495587255805731_9662041438277811" name="The_data_9495587255805731_9662041438277811"&gt;&lt;/a&gt;The data&lt;/h2&gt;&lt;br&gt;&lt;div&gt;We will base our example on this simple schema:&lt;/div&gt;&lt;br&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;CREATE SCHEMA&amp;nbsp;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;metadatatest&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;;&lt;/font&gt;&lt;/div&gt;&lt;br&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;CREATE TABLE&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;metadatatest.fact_sales&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;(&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;date_id INT(255),&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;location VARCHAR(70),&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;sales INT(255)&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;)&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;;&lt;/font&gt;&lt;/div&gt;&lt;br&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;INSERT INTO&amp;nbsp;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;metadatatest.fact_sales&amp;nbsp;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;VALUES&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;(1,&amp;quot;London&amp;quot;, 34),(1,&amp;quot;Manchester&amp;quot;, 44),(2,&amp;quot;London&amp;quot;,24),(2,&amp;quot;Manchester&amp;quot;,35),(2,&amp;quot;Bristol&amp;quot;,34),(3,&amp;quot;London&amp;quot;,53)&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;;&lt;/font&gt;&lt;/div&gt;&lt;br&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;CREATE TABLE&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;metadatatest.fact_stock&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;(&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;date_id INT(255),&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;location VARCHAR(70),&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;aisle VARCHAR(70),&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;stock INT(255)&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;)&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;;&lt;/font&gt;&lt;/div&gt;&lt;br&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;INSERT INTO&amp;nbsp;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;metadatatest.fact_stock&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;VALUES&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;(1,&amp;quot;London&amp;quot;,&amp;quot;aisle 1&amp;quot;, 34),(1,&amp;quot;London&amp;quot;,&amp;quot;aisle 2&amp;quot;, 44),(1,&amp;quot;London&amp;quot;,&amp;quot;aisle 3&amp;quot;, 234),(1,&amp;quot;Manchester&amp;quot;,&amp;quot;aisle 1&amp;quot;, 44),(1,&amp;quot;Manchester&amp;quot;,&amp;quot;aisle 2&amp;quot;, 344),(2,&amp;quot;London&amp;quot;,&amp;quot;aisle 1&amp;quot;,24),(2,&amp;quot;London&amp;quot;,&amp;quot;aisle 2&amp;quot;,25),(2,&amp;quot;Manchester&amp;quot;,&amp;quot;aisle 1&amp;quot;,35),(2,&amp;quot;Bristol&amp;quot;,&amp;quot;aisle 1&amp;quot;,34),(2,&amp;quot;Bristol&amp;quot;,&amp;quot;aisle 2&amp;quot;,324),(3,&amp;quot;London&amp;quot;,&amp;quot;aisle 1&amp;quot;,53)&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;;&lt;/font&gt;&lt;/div&gt;&lt;br&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;CREATE TABLE&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;metadatatest.dim_date&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;(&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;date_id INT(255),&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;date DATE&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;)&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;;&lt;/font&gt;&lt;/div&gt;&lt;br&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;INSERT INTO&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;metadatatest.dim_date&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;VALUES&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;(1,&amp;quot;2011-01-01&amp;quot;),(2,&amp;quot;2011-01-02&amp;quot;),(3,&amp;quot;2011-01-03&amp;quot;)&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;;&lt;/font&gt;&lt;/div&gt;&lt;br&gt;&lt;div&gt;What we want to achieve is basically getting the same result out of PME as with following summary query:&lt;/div&gt;&lt;br&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;SELECT&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;*&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;FROM&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;(&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;SELECT&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;date,&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;SUM(sales) AS sales&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;FROM&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;metadatatest.fact_sales s&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;INNER JOIN&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;metadatatest.dim_date d&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;ON&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;s.date_id=d.date_id&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;GROUP BY 1&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;) a&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;INNER JOIN&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;(&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;SELECT&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;date,&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;SUM(stock) AS stock&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;FROM&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;metadatatest.fact_stock s&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;INNER JOIN&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;metadatatest.dim_date d&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;ON&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;s.date_id=d.date_id&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;GROUP BY 1&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;) b&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;ON&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;a.date=b.date&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;;&lt;/font&gt;&lt;/div&gt;&lt;br&gt;Open your favourite SQL client and run these queries.&lt;br&gt;&lt;br&gt;&lt;div&gt;The aggregation query gives back following result:&lt;/div&gt;&lt;div id="gfja" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_212cffd22g7_b" style="height:109px;width:295px"&gt;&lt;/div&gt;&lt;h2&gt;&lt;a id="Metadata_Model_230571658583357" name="Metadata_Model_230571658583357"&gt;&lt;/a&gt;Metadata Model&lt;/h2&gt;So let&amp;#39;s start creating our Metadata model: One thing to keep in mind is that our two fact tables have different granularity. In PME you cannot just import them as physical tables, then place them both in a business model and create a relationship between them: Such a model will not return correct aggregations.&lt;br&gt;&lt;br&gt;The critical element is: You basically have to specify the &amp;quot;physical tables&amp;quot; as join of your star schemas. What I mean by this is that you write a query that joins your fact table with all the dimension tables. This query returns a result set which can act as a &amp;quot;physical table&amp;quot; in PME (although the wording &amp;quot;physical table&amp;quot; doesn&amp;#39;t make sense in the context, it is more a derived table or better said a view).&amp;nbsp;&lt;br&gt;&lt;br&gt;&lt;div&gt;In our case we will have two derived tables. These two derived tables have to have the same granularity:&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Sales Table&lt;/b&gt;: a join of the fact_sales table with the date dimension&lt;/li&gt;&lt;li&gt;&lt;b&gt;Stock Table&lt;/b&gt;: a jon of the fact_stock table with the date dimension, aggregated by date and location&lt;/li&gt;&lt;/ul&gt;&amp;nbsp;&amp;nbsp;&lt;br&gt;&lt;ol&gt;&lt;li&gt;Open PME and create a new domain.&lt;/li&gt;&lt;li&gt;Set up your database connection to the just created schema.&lt;/li&gt;&lt;li&gt;Reference our two fact tables.&lt;/li&gt;&lt;li&gt;Double click on the fact_sales table. The properties window will be shown.&lt;/li&gt;&lt;li&gt;Click on the green plus icon in the &lt;i&gt;Properties &lt;/i&gt;section and add the &lt;i&gt;Target Table&lt;/i&gt;&amp;nbsp;property. Click &lt;i&gt;OK&lt;/i&gt;.&lt;/li&gt;&lt;li&gt;Fill out the &lt;i&gt;Target Table&lt;/i&gt;&amp;nbsp;field with this query:&lt;br&gt;&amp;nbsp;&lt;br&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;SELECT date date_1, location location_1, SUM(sales) AS sales FROM metadatatest.fact_sales s INNER JOIN metadatatest.dim_date d ON s.date_id=d.date_id GROUP BY 1, 2).&lt;/font&gt;&lt;br&gt;&lt;br&gt;Note we gave the date and location columns intentionally different names so that they are later on easier to distinguish from the other fact table&amp;#39;s fields.&lt;br&gt;&lt;div id="mso5" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_207g8scmqf3_b" style="height:602.0787401574803px;width:648px"&gt;&lt;/div&gt;&lt;br&gt;&lt;/li&gt;&lt;li&gt;Click &lt;i&gt;OK&lt;/i&gt;&amp;nbsp;to close the &lt;i&gt;Properties&lt;/i&gt;&amp;nbsp;window.&lt;/li&gt;&lt;li&gt;Double click on the fact_stock table. The properties dialog will be shown.&lt;br&gt;&lt;/li&gt;&lt;li&gt;Click on the green plus icon and add the&amp;nbsp;&lt;i&gt;Target Table&lt;/i&gt;&amp;nbsp;property. Click&amp;nbsp;&lt;i&gt;OK&lt;/i&gt;.&lt;/li&gt;&lt;li&gt;Fill out the&amp;nbsp;&lt;i&gt;Target Table&lt;/i&gt;&amp;nbsp;field with this query: Fill out the&amp;nbsp;&lt;i&gt;Target Table&lt;/i&gt;&amp;nbsp;field with this query: &lt;br&gt;&lt;br&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;SELECT date, location, SUM(stock) AS stock FROM metadatatest.fact_stock s INNER JOIN metadatatest.dim_date d ON s.date_id=d.date_id GROUP BY 1, 2&lt;br&gt;&lt;br&gt;&lt;/font&gt;&lt;/li&gt;&lt;li&gt;Click&amp;nbsp;&lt;i&gt;OK&lt;/i&gt;&amp;nbsp;to close the&amp;nbsp;&lt;i&gt;Properties&lt;/i&gt;&amp;nbsp;window.&lt;/li&gt;&lt;li&gt;Create a business model and drag and drop the physical tables into the &lt;i&gt;Business Tables&lt;/i&gt;&amp;nbsp;folder. Your Tables should now look like this (as you can see they have same granularity now):&lt;br&gt;&lt;br&gt;&lt;div id="pnuh" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_208f399k7zq_b" style="height:428px;width:238px"&gt;&lt;/div&gt;&lt;br&gt;&lt;/li&gt;&lt;li&gt;Next create the relationship: Drag and drop the business tables onto the canvas, hold down the CTRL key, mark the first table and then the second one and right click. Choose &lt;i&gt;Add Relationship ...&lt;/i&gt;&lt;/li&gt;&lt;li&gt;Set &lt;i&gt;Relationship &lt;/i&gt;to &lt;i&gt;N:N&lt;/i&gt; and &lt;i&gt;Join type &lt;/i&gt;to &lt;i&gt;Inner&lt;/i&gt;.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Tick&amp;nbsp;&lt;i&gt;Complex Join? &lt;/i&gt;and copy following lines into the &lt;i&gt;Complex Join Expression&lt;/i&gt;:&amp;nbsp;&lt;br&gt;&lt;br&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;" size="2"&gt;AND([BT_FACT_SALES_FACT_SALES.BC_FACT_SALES_DATE_1]=[BT_FACT_STOCK_FACT_STOCK.BC_FACT_STOCK_DATE]; [BT_FACT_SALES_FACT_SALES.BC_FACT_SALES_LOCATION_1]=[BT_FACT_STOCK_FACT_STOCK.BC_FACT_STOCK_LOCATION]&lt;/font&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;)&lt;br&gt;&lt;br&gt;&lt;/font&gt;&lt;div id="abdy" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_210cz9zdzfd_b" style="height:413.00240963855424px;width:648px"&gt;&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;/li&gt;&lt;li&gt;&lt;div id="w6h." style="text-align:left"&gt;Click &lt;i&gt;OK.&lt;/i&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;Save the model. Now we are ready to test if it is working properly.&lt;/li&gt;&lt;li&gt;Click on the &lt;i&gt;Query Editor &lt;/i&gt;icon. Select Date, Sales and Stock as columns, then press the &lt;i&gt;Play&lt;/i&gt;&amp;nbsp;button. Examine the result: It returns exactly the same values as the SQL query we ran at the beginning of the tutorial. If you are curious you can as well click on the &lt;i&gt;SQL&lt;/i&gt; icon and you can see which SQL query PME created under the hood.&lt;br&gt;&lt;br&gt;&lt;div id="quw4" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_211c2jvscg7_b" style="height:484.8775981524249px;width:648px"&gt;&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h2&gt;My Suggestions&lt;/h2&gt;&lt;div&gt;It is important to provide feedback to the developers of such great products as the PME. I can see in my daily work what a big impact this product makes. I can see end users who can finally create reports to their liking without running to a report designer and waiting for the result to be delivered. When you create a lot of reports you don&amp;#39;t have to worry if a database change results in having to change all the references in all your reports. From my point of view a metadata model is a key element in a BI system.&amp;nbsp;&lt;/div&gt;&lt;br&gt;&lt;div&gt;In the beginning of this article I already mentioned that I don&amp;#39;t think the current way of setting up this solution is ideal. The reason for this is that it breaks the concept. Normally you would define the relationships between tables in a business model and the SQL would be automatically created. When dealing with more than one fact table (with different granularity), you have to use a completely different approach and write a SQL query yourself by joining your fact table all dimension tables and only then you can create the relationship diagram.&lt;/div&gt;&lt;div&gt;It&amp;#39;s not a problem of &amp;quot;Oh I have to write a query&amp;quot;, but it is more a problem of consistent approach. I&amp;#39;d really welcome if we could design the complete model in a relationship diagram (consistant approach) instead of hacking the shortcomings by providing SQL queries. I think the user experience would be much better.&lt;/div&gt;&lt;div&gt;I set up a &lt;a href="http://jira.pentaho.com/browse/PMD-693" id="kn4e" title="JIRA case"&gt;JIRA case&lt;/a&gt; on the Pentaho website to, please show your support by voting for it and we might see this feature implemented soon!&lt;/div&gt;&lt;div&gt;At the end of the session I&amp;#39;d like the thank Will for his great support!&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4527276399966185267-8123174970066947506?l=diethardsteiner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://diethardsteiner.blogspot.com/feeds/8123174970066947506/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://diethardsteiner.blogspot.com/2011/02/pentaho-metadata-editor-joining-two_04.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4527276399966185267/posts/default/8123174970066947506'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4527276399966185267/posts/default/8123174970066947506'/><link rel='alternate' type='text/html' href='http://diethardsteiner.blogspot.com/2011/02/pentaho-metadata-editor-joining-two_04.html' title='Pentaho Metadata Editor: Joining two fact tables'/><author><name>Diethard Steiner</name><uri>https://profiles.google.com/101564429460248850938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4527276399966185267.post-1724491998252308529</id><published>2011-01-31T13:31:00.001-08:00</published><updated>2011-09-21T09:46:07.387-07:00</updated><title type='text'>Pentaho Data Integration: Remote execution with Carte</title><content type='html'>&lt;font size="4"&gt;&lt;b&gt;Pentaho Data Integration: Remote execution with Carte&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br&gt;&lt;p style="margin-left:0px;margin-right:0px"&gt;&lt;b&gt;Tutorial Details&lt;/b&gt;&lt;br&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;Software: PDI/Kettle 4.1 (download&amp;nbsp;&lt;a href="http://sourceforge.net/projects/pentaho/files/" id="nlz4" title="here"&gt;here&lt;/a&gt;), installed on your PC and on a server&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Knowledge: Intermediate (To follow this tutorial you should have good knowledge of the software and hence not every single step will be described)&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Carte is an often overlooked small web server that comes with Pentaho Data Integration/Kettle. It allows remote execution of transformation and jobs. It even allows you to create static and dynamic clusters, so that you can easily run your power hungry transformation or jobs on multiple servers. In this session you will get a brief introduction on how to work with Carte.&lt;/p&gt;&lt;p&gt;Now let&amp;#39;s get started: SSH to the server where Kettle is running on (this assumes you have already installed Kettle there).&lt;/p&gt;&lt;h2&gt;&lt;a id="Encrypt_password" name="Encrypt_password"&gt;&lt;/a&gt;&lt;font size="4"&gt;Encrypt password&lt;/font&gt;&lt;/h2&gt;&lt;div&gt;Carte requires a user name and password. It&amp;#39;s good practise to encrypt this password. Thankfully Kettle already comes with an encryption utility.&lt;/div&gt;&lt;div&gt;In the PDI/data-integration/ directory run:&lt;/div&gt;&lt;br&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;sh encr.sh -carte yourpassword&lt;br&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;OBF:1mpsdfsg323fssmmww3352gsdf7&lt;/font&gt;&lt;/div&gt;&lt;br&gt;Open pwd/kettle.pwd and copy the encrypted password after &amp;quot;cluster: &amp;quot;:&lt;/div&gt;&lt;br&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;vi ./pwd/kettle.pwd&lt;/font&gt;&lt;/div&gt;&lt;br&gt;&lt;div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;# Please note that the default password (cluster) is obfuscated using the Encr script provided in this release&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;# Passwords can also be entered in plain text as before&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;#&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;cluster: &lt;font style="background-color:#f1c232"&gt;OBF:&lt;/font&gt;&lt;/font&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;&lt;font color="#38761d"&gt;&lt;font style="background-color:#f1c232"&gt;1mpsdfsg323fssmmww3352gsdf7&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;&lt;br&gt;Please note that &amp;quot;cluster&amp;quot; is the default user name.&lt;/div&gt;&lt;h2&gt;&lt;a id="Start_carte_sh" name="Start_carte_sh"&gt;&lt;/a&gt;&lt;font size="4"&gt;Start carte.sh&lt;/font&gt;&lt;/h2&gt;&lt;div&gt;Make sure first that the port you will use is available and open.&lt;/div&gt;&lt;br&gt;In the simplest form you start carte with just one slave that resides on the same instance:&amp;nbsp;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;nohup sh carte.sh localhost 8181 &amp;gt; carte.err.log &amp;amp;&lt;/font&gt;&lt;/div&gt;&lt;br&gt;&lt;div&gt;After this, press CTRL+C .&lt;/div&gt;&lt;br&gt;&lt;div&gt;To see if it started:&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;tail -f carte.err.log&lt;/font&gt;&lt;/div&gt;&lt;br&gt;&lt;div&gt;Although outside the scope of the session, I will give you a brief idea on how to set up a cluster: If you want to run a cluster, you have to create a configuration XML file. Examples can be found in the pwd directory. Open one of these XMLs and amend it to your needs. Then issue following command:&lt;br&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;sh carte.sh ./pwd/carte-config-8181.xml &amp;gt;&amp;gt; ./pwd/err.log&lt;/font&gt;&lt;/div&gt;&lt;br&gt;&lt;div&gt;&lt;font size="4"&gt;&lt;b&gt;Check if the server is running&lt;/b&gt;&lt;/font&gt;&lt;/div&gt;&lt;br&gt;Issue following commands:&lt;br&gt;&lt;br&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;[root@ip-11-111-11-111 data-integration]# ifconfig&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;eth0 &amp;nbsp; &amp;nbsp; &amp;nbsp;Link encap:Ethernet &amp;nbsp;HWaddr ...&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;inet addr:&lt;font style="background-color:#ffd966"&gt;11.111.11.111&lt;/font&gt;&amp;nbsp;&amp;nbsp;Bcast:&lt;/font&gt;&lt;/div&gt;&lt;br&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;[... details omitted ...]&lt;/font&gt;&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;[root@ip-11-111-11-111 data-integration]# wget http://&lt;font style="background-color:#6fa8dc"&gt;cluster&lt;/font&gt;:&lt;font style="background-color:#b4a7d6"&gt;yourpassword&lt;/font&gt;@&lt;font style="background-color:#ffd966"&gt;11.111.11.111&lt;/font&gt;:&lt;font style="background-color:#ea9999"&gt;8181&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;&lt;br&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;--2011-01-31 13:53:02-- &amp;nbsp;http://cluster:*password*@11.111.11.111:8181/&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;Connecting to 11.111.11.111:8181... connected.&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;HTTP request sent, awaiting response... 401 Unauthorized&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;Reusing existing connection to 11.111.11.111:8181.&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;HTTP request sent, awaiting response... 200 OK&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;Length: 158 [text/html]&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;Saving to: `index.html&amp;#39;&lt;/font&gt;&lt;/div&gt;&lt;br&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;100%[======================================&amp;gt;] 158 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; --.-K/s &amp;nbsp; in 0s&lt;/font&gt;&lt;/div&gt;&lt;br&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;2011-01-31 13:53:02 (9.57 MB/s) - `index.html&amp;#39; saved [158/158]&lt;/font&gt;&lt;/div&gt;&lt;br&gt;If you get a message like the one above, a web server call is possible, hence the web server is running.&lt;/div&gt;&lt;br&gt;&lt;div&gt;With the wget command you have to pass on the&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;user name &lt;/b&gt;(highlighted blue)&lt;/li&gt;&lt;li&gt;&lt;b&gt;password&lt;/b&gt; (highlighted violet)&lt;/li&gt;&lt;li&gt;&lt;b&gt;IP address&lt;/b&gt; (highlighted yellow)&lt;/li&gt;&lt;li&gt;&lt;b&gt;port number&lt;/b&gt; (highlighted red)&lt;/li&gt;&lt;/ul&gt;&lt;br&gt;&lt;div&gt;Or you can install lynx:&lt;/div&gt;&lt;br&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;[root@ip-11-111-11-111 data-integration]# yum install lynx&lt;br&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;[root@ip-11-111-11-111 data-integration]# lynx http://cluster:yourpassword@11.111.11.111:8181&lt;/font&gt;&lt;/div&gt;&lt;br&gt;&lt;div&gt;It will ask you for user name and password and then you should see a simple text representation of the website: Not more than a nearly empty Status page will be shown.&lt;/div&gt;&lt;br&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Kettle slave server&lt;/font&gt;&lt;/div&gt;&lt;br&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;Slave server menu&lt;/font&gt;&lt;/div&gt;&lt;br&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;&amp;nbsp;&amp;nbsp; Show status&lt;/font&gt;&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;Commands: Use arrow keys to move, &amp;#39;?&amp;#39; for help, &amp;#39;q&amp;#39; to quit, &amp;#39;&amp;lt;-&amp;#39; to go back.&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;&amp;nbsp;&amp;nbsp;Arrow keys: Up and Down to move. &amp;nbsp;Right to follow a link; Left to go back.&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#38761D" face="&amp;#39;Courier New&amp;#39;"&gt;&amp;nbsp;H)elp O)ptions P)rint G)o M)ain screen Q)uit /=search [delete]=history list&lt;/font&gt;&lt;/div&gt;&lt;br&gt;&lt;br&gt;You can also just type the URL in your local web browser:&lt;div&gt;http://ec2-11-111-11-111.XXXX.compute.amazonaws.com:8181&lt;/div&gt;&lt;br&gt;&lt;div&gt;You will be asked for user name and password and then you should see an extremely basic page.&lt;br&gt;&lt;br&gt;&lt;h2&gt;&lt;a id="Define_salve_server_in_Kettle" name="Define_salve_server_in_Kettle"&gt;&lt;/a&gt;&lt;font size="4"&gt;Define salve server in Kettle&lt;/font&gt;&lt;/h2&gt;&lt;ol&gt;&lt;li&gt;Open Kettle, open a transformation or job&lt;/li&gt;&lt;li&gt;Click on the&amp;nbsp;&lt;i&gt;View&amp;nbsp;&lt;/i&gt;panel&lt;/li&gt;&lt;li&gt;Right click on&amp;nbsp;&lt;i&gt;Slave server&lt;/i&gt;&amp;nbsp;and select&amp;nbsp;&lt;i&gt;New&lt;/i&gt;.&lt;/li&gt;&lt;/ol&gt;&lt;div id="d:m9" style="text-align:left"&gt;&lt;div id="a-x2" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_203dk9ftmn9_b" style="height:352.335px;width:648px"&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;div id="w:wc" style="text-align:left"&gt;&lt;br&gt;&lt;/div&gt;&lt;div id="o2vt" style="text-align:left"&gt;Specify all the details and click OK. In the tree view, right click on the slave server you just set up and choose&amp;nbsp;&lt;i&gt;Monitor&lt;/i&gt;. Kettle will now display the running transformations and jobs in a new tab:&lt;/div&gt;&lt;div id="ijsk" style="text-align:left"&gt;&lt;div id="q1x4" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_205f7rz7dc8_b" style="height:119.478px;width:648px"&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Your transformations can only use the slave server if you specify it in the&amp;nbsp;&lt;i&gt;Execute a transformation&amp;nbsp;&lt;/i&gt;dialog.&lt;/div&gt;&lt;div id="b_28" style="text-align:left"&gt;&lt;img src="http://docs.google.com/File?id=df8nc66c_204dzbs5mrs_b" style="height:381.452px;width:648px"&gt;&lt;/div&gt;&lt;br&gt;&lt;div&gt;For jobs you have to specify the remote slave server in each job entry dialog.&amp;nbsp;&lt;/div&gt;&lt;br&gt;&lt;div&gt;If you want to set up a cluster schema, define the slaves first, then right click on&amp;nbsp;&lt;i&gt;Kettle cluster schemas&lt;/i&gt;. Define a&amp;nbsp;&lt;i&gt;Schema&lt;/i&gt;&amp;nbsp;Name and the other details, then click on&amp;nbsp;&lt;i&gt;Select slave servers&lt;/i&gt;. Specify the servers that you want to work with and define one as the master. A full description of this process is outside the scope of this article. For further info, the &amp;quot;&lt;a href="http://www.amazon.co.uk/Pentaho-Kettle-Solutions-Building-Integration/dp/0470635177/ref=sr_1_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1296508342&amp;amp;sr=8-1" id="jxt8" title="Pentaho Kettle Solutions"&gt;Pentaho Kettle Solutions&lt;/a&gt;&amp;quot; book will give you a detailed overview.&lt;/div&gt;&lt;/div&gt;&lt;br&gt;&lt;div&gt;For me a convenient way to debug a remote execution is to open a terminal window, ssh to the remote server and tail -f carte.err.log. You can follow the error log in Spoon as well, but you&amp;#39;ll have to refresh it manually all the time.&lt;/div&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4527276399966185267-1724491998252308529?l=diethardsteiner.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://diethardsteiner.blogspot.com/feeds/1724491998252308529/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://diethardsteiner.blogspot.com/2011/01/pentaho-data-integration-remote.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4527276399966185267/posts/default/1724491998252308529'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4527276399966185267/posts/default/1724491998252308529'/><link rel='alternate' type='text/html' href='http://diethardsteiner.blogspot.com/2011/01/pentaho-data-integration-remote.html' title='Pentaho Data Integration: Remote execution with Carte'/><author><name>Diethard Steiner</name><uri>https://profiles.google.com/101564429460248850938</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4527276399966185267.post-483093347620672736</id><published>2011-01-26T13:09:00.001-08:00</published><updated>2011-01-30T03:08:55.148-08:00</updated><title type='text'>Kettle Transformation Logging and Change Data Capture (New)</title><content type='html'>&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;font size="4"&gt;&lt;b&gt;Kettle Transformation Logging and Change Data Capture&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;p&gt;&lt;i&gt;Updated Version including the great feedback from Matt Casters and Jos (both authors of the fantastic &amp;quot;&lt;a href="http://www.amazon.co.uk/Pentaho-Kettle-Solutions-Building-Integration/dp/0470635177" id="ggkn" title="Kettle Solutions"&gt;Kettle Solutions&lt;/a&gt;&amp;quot; book)&lt;/i&gt;&lt;/p&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;br&gt;&lt;/div&gt;&lt;div class="writely-toc" id="WritelyTableOfContents" toctype="none+none"&gt;&lt;ol class="writely-toc-none"&gt;&lt;li&gt;&lt;a href="#CDC_30501381284557283_41935877758078277" target="_self"&gt;CDC&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="#Setting_up_Logging_20191041682846844" target="_self"&gt;Setting up Logging&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="#A_safe_approach_to_CDC_3889581288676709" target="_self"&gt;A safe approach to CDC&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="#Sample_File" target="_self"&gt;Sample File&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;br&gt;&lt;p&gt;&lt;b&gt;Tutorial Details&lt;/b&gt;&lt;br&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Software: PDI/Kettle 4.1 (download&amp;nbsp;&lt;a href="http://sourceforge.net/projects/pentaho/files/" id="nlz4" title="here"&gt;here&lt;/a&gt;), MySQL Server (download&amp;nbsp;&lt;a href="http://www.mysql.com/downloads/" id="v7vd" title="here"&gt;here&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;Knowledge: Intermediate (To follow this tutorial you should have good knowledge of the software and hence not every single step will be described)&lt;/li&gt;&lt;li&gt;Tutorial files can be downloaded &lt;a href="http://docs.google.com/leaf?id=0B-yuO-Oixq4ROWVmNDU2NTYtNDkzZS00ZThmLTkyY2YtZTkxYzRlNjAxM2Qx&amp;amp;hl=en_GB" id="gnj4" title="here"&gt;here&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;h2&gt;&lt;a id="CDC_30501381284557283_41935877758078277" name="CDC_30501381284557283_41935877758078277"&gt;&lt;/a&gt;CDC&lt;/h2&gt;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;In this session we will look at the extensive Pentaho Data Integration/Kettle 4.1 logging features. Now how come we also talk about &lt;b&gt;Change Date Capture&lt;/b&gt; (CDC)? This is because Kettle incorporates logging of the start and end date for CDC in the logging architecture.&amp;nbsp;&lt;/div&gt;&lt;div style="background-color:transparent;margin-left:0px;margin-right:0px"&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="vertical-align:baseline"&gt;If you are not familiar with CDC, here a brief summary: CDC allows you to capture all the data from the source system that has changed since the last time you ran the ETL process. &lt;/span&gt;&lt;
