Skip to Content
Author's profile photo Bill Ramos

Analyzing Wikipedia Data with SAP Lumira

In this final post in the series, we will analyze the Wikipedia data that we originally filtered using AWS Elastic Map Reduce and Apache Hive, then loaded the transformed data into a SAP HANA database and created an Analytic View on the tables. What we will do is look at several examples of how you can use the Wikipedia data to help determine the effectiveness of marketing programs.

Legal notice: Page view statistics for Wikimedia projects provided by the Wikimedia Foundation, Inc. at under the Creative Commons Attribution-ShareAlike 3.0 Unported License (see The original statistics have been filtered, sorted and visualized.

First off, you can get a free 30 day trial of the Personal Edition of SAP Lumira at This version works with SAP HANA One on AWS. I installed my trial on the AWS EC2 VM I use for my SAP HANA Studio client.

Creating a Low Privileged User for the Lumira User

Up until this point, we’ve been using the SYSTEM user account in SAP HANA Studio to perform our tasks. As the SYSTEM user is a high privileged – like the Linux root user –  you will want to setup a user account that has just the needed permissions to access the data using SAP Lumira or other tools.

To set permissions using SQL statements:

1. In the SAP HANA Studio, right click on the Catalog folder and select the SQL Console command.

2. Paste the following statements into the SQL Console and then press F8 to execute the statements.

— Create the low priviledged user for Lumira


— Grant SELECT permissions on the SCHEMAs where the

— data resides for your Analytic Views




— Grant remaining rights needed to view and execute

— Analytic Packages



— Check to see that the permissions were set correctly


You should see the permissions from SYS.GRANTED_PRIVILEDGES as shown in Figure 1.

Figure 1 Permissions for LUMIRA user

Figure 1 Lumira permissions.png                   


Getting started with SAP Lumira

In this section, you will open up the PAGEHITS Analytic View created as part of the blog post “Building an Analytic & Calculation View from the Wikipedia HANA tables for use with SAP Lumira” with SAP Lumira so you can start your analysis.

1. Open up the SAP Lumira program located on your desktop.

2. Click the New Document button.

Figure 2 Create a new document

Figure 2 Lumira New Document.png 

3. In the New Document Select a source window, click on the SAP HANA Online option.

Figure 3 Select SAP HANA Online as the data source

Figure 3 Select SAP HANA Online.png 

4. For the SAP HANA Server name, enter in your server name – for example: hanaserver. For the SAP HANA Server instance number, enter in 00. For the User Name field, enter in LUMIRA. For the User Password, enter in Hana1234. Then, click the Connect SAP HANA Instance button.

Figure 4 Connect to SAP HANA instance

Figure 4 Connect.png 

5. To preview and select the data to analyze, click on the PAGEHITS view, click the Preview and select data checkbox and click the Select button as shown in Figure 5.

Figure 5 List of available views

Figure 5 List views.png 

6. Since all data is for the year 2013, scroll down to the bottom of the Attributes list and deselect the checkbox next to the YEAR attribute. This dialog allows you to preview data by clicking on the Click here to see values samples link and add filter conditions. Try clicking on the Values Preview links. Click on a Filter link to see how it works, but don’t set a filter at this point. Click OK when you are finished experimenting with the dialog.

Figure 6 Preview and select data

Figure 6 Preview and select data.png 

Upon clicking OK, Lumira displays it’s Visualize design surface as shown in Figure 7.

Figure 7 Lumira Visualize design surface

Figure 7 Lumira design surface.png 

You are now ready to start analyzing the Wikipedia data with Lumira.

Quick tour of SAP Lumira

SAP Lumira allows you to change various preferences for the software through the File | Preferences… command. To make the text easier to read, you can change the font size using the Font used for UI rendering (*) option. In Figure 8, you will see that this session is using a 12 point font.

Figure 8 Change SAP Lumira preferences

Figure 8 Preferences.png 

You can also change the scale factor for charts for better readability using the Chart settings tab with the Apply a factor to chart font size setting. For example, 150%. Note: You need to close Lumira and then restart it and create a New Document to see the changes. There is no need to perform these steps to continue.

1. Resize the Object Picker to make it wider so that you can see the Measure and Attribute names better.

Figure 9 Visualize view

Figure 9 SAP Lumira UI tour.png 

The Visualize view allows you to drag columns into the Measures and Dimensions regions of the chart area to display data similar to the way you would to preview data in SAP HANA Studio.

2. Click Data to view the data.

Figure 10 Scenario pane

Figure 10 Data.png 

By default, Lumira creates an Occurrences measure that is used to show the number of times an attribute value occurs in the data set. Each column is called a Facet. The Facets are automatically sorted in descending order based on the measure selected to the left of the Facets. You see that the date 3/12/2013 had the most occurrences of pages that had over 100 hits for the three months of data.

3. Click in the PAGEHIT… button for the PAGECOUNTHITFORHOUR measure to see how the Facets change based on the new measure that you selected. Then resize some of the columns to see the attribute values and page hit count values easier.

Figure 11 Facets showing PAGECOUNTHITFORHOUR measure totals

Figure 11 Pagehit facets.png 

Notice that the day with the most page hits is April 3 2013. Also notice that the two days of the week with the least number of page hits are Saturday and Sunday.

4. To see both the data and work with charts, click on the Split button. You can create a quick bar chart by double clicking on the PAGEHITCOUNTFORHOUR in the Measures Object Picker to add it to the Y Axis 1 and then double click on the DAY_OF_WEEK in the Attributes Object Picker to add it to the X Axis.

Figure 12 Quick chart

Figure 12 Quick chart.png 

5. To see the actual English day of the week, first click on the Visualize button next to the Split button to display just the chart data. Then, double click on the ENGLISH_DAY_OF_WEEK attribute. You will see that 0 corresponds to Monday.

Figure 13 Adding attributes to x-axis

Figure 13 Adding attribute to X Axis.png 

6. To see how page hits by day of the week are impacted by different languages, you can use a filter on the Language facet. First, scroll to the Language Facet and then resize it so you can see the Language names and page hit values. Then click the Filter icon to open the Filter items dialog.

Figure 14 Filter on facet

Figure 14 Filter on facet.png 

7. To set a filter on multiple languages, select the first four languages in the list and then click the Add button to add them to the Filtered values list. Then click the Close button to set the filter condition.

Figure 15 Select a filter on top 4 occurring languages

Figure 15 Select languages to filter.png 

To see that the filter was set, Lumira displays the facet filter in the Global Filters region above the facets. You will also see that the chart is updated based on the set filter.

8. To see how each language interacts overall with Wikipedia data, first click on the Line chart type just above the chart region. Then, drag the Language attribute in the Attribute Object Picker and drop it into the Legend Color Dimension.

Figure 16 Specifying the measure columns

Figure 16 Languages by day of the week.png 

You can see that German language picks up its activity on Sunday. You can also see that peak times with Japanese are Friday, Saturday and Sunday. One thing to keep in mind is that all times are based on the UTC time zone. We also can’t assume that a language is tied to a specific geographical location, especially English.

9. To clear the global filter, click on the little X icon next to the filter in the Global Filter area.

Figure 17 Clear the global filter

Figure 17 Clear global filter.png 

Note that all of the languages are now shown in the chart, many of which all overlap at the bottom of the chart. Click on the close icon next to the Language attribute in the Legend Color Dimension to remove the Language series from the chart.

Analyzing Wikipedia Page Hits

In this section, you will see how events related to a topic on Wikipedia influence the page hits for the topic. In this example, you will look at the page hits for the SAP HANA page.

At this point, you should have the PAGEHITCOUNTFORHOUR measure setup in the Y Axis 1 position as a bar chart.

1. Double click on the DATE_SQL attribute to add it to the X Axis to display the hits per day for the three month period.

2. Scroll the facet region so that you can see the PAGENAME attribute, click on the filter button for the facet and then type SAP_HANA into the search box.

3. Select the value and click the Add button to set the filter. You will see that the chart is updated to show the page hit totals for each day related to the SAP_HANA page. Then, click the Close button to dismiss the filter dialog.

Figure 18 Set filter on the SAP_HANA page

Figure 18 Set filter on the SAP_HANA page.png 

4. You will see that there are three major spikes in page hits for the SAP_HANA page for May 6, May 16 and May 29. The spikes on May 16 and 17 are easy to explain due to the number of announcements that were made at the SAP Sapphire conference May 14-16. To understand what happened on May 6, click on bar in the chart and then press the Filter button in the chart region.

Figure 19 Filter on a select bar

Figure 19 Filter on May 6.png 

The result is a local filter in the chart that does not change the global filter and the facet values.

5.    To see how hits looked hour-by-hour for the day, double click on the HOUR attribute in the Attributes Object Picker. You will see that all the page hits occurred in the 23pm time period UMT or 7pm EST May 6.

6.    If you are someone at SAP or a SAP HANA watcher, you might know what happened. A search of press releases around that time period revealed the announcement of the SAP HANA Enterprise Cloud on May 7. Click on the link – to view the press release. Note that the date for the press release was May 7. Before press releases like this, there is often a pre-announcement social media buzz or inadvertent media leak that takes place. To see what might have caused the buzz and the subsequent hits on the SAP_HANA Wikipedia page, click on the link There you will find an article titled SAP HANA Enterprise Cloud FAQ dated May 6, 2013 7:19PM. Anyone watching SAP would have an RSS feed on the documents coming from, so it is possible that this article caused the buzz.

7.    To clear the chart local filter, there is a chart Filter area in the lower left portion of the chart UI where you will see the DATE_SQL attribute. Click on the X next to the DATE_SQL attribute to remove the filter.

Figure 20 Creating a calculation view

Figure 20 Clear the local chart filter.png 

Once you clear the filter, you will see a huge spike for the 23 hour on May 6 that is almost 10 times more than any other hour period for the three month period. For the marketing people at SAP, they could correlate this burst with any Facebook, Twitter and activity to see if there was a similar spike at that same time.

8. To review the distribution of page hits per hour for the May 29 period, double click on the 5/29/2013 date in the DATE_SQL facet. You will see a fairly even distribution of page hits between the hours of 0700 and 1400 UMT. Going back through the SAP press releases for May 29, one stands out – This press release is titled “SAP Named Global Market Leader in Business Intelligence by Gartner”. Again, marketing people at SAP could cross correlate this to their web properties to see how this press release may have caused a “buzz” on Facebook and Twitter. It appears that product announcement “leaks” can cause a larger bump in page hits in a short period of time over a positive analyst report. Again, this could be cross correlated with page hit data from other sources to determine if Wikipedia can in fact be a bell-weather baseline for social media events.

Using SAP Lumira to determine trending

In this section, you will learn how easy it is to create trend lines against the page hit data over time.

1. Click on the X next to the HOUR Dimension in the X Axis region to remove the HOUR from the chart. Then, click on the X next to the DATE_SQL in the Global Filters region to show all the data for the three month period. Then, click on the Line chart option to change from a bar to a line chart.

2. There is a small down arrow button next to the PAGEHITCOUNTFORHOUR measure in the Measures Y Axis 1 region that displays a drop down menu. Select the Add calculation > Running Average command.

Figure 21 Adding a running average trend line

Figure 21 Add running average.png 

This action displays the running average trend for the page hits over the period.

Figure 22 Calculation view design area

Figure 22 Display of running average.png 

You can see that SAP Lumira created a new calculated measure in the Y Axis region that computes the running average on the fly.

Just to wrap up, you should have a good appreciation of how to do the following:

  • Create a low privileged user for accessing the data using SAP Lumira.
  • Create a new SAP Lumira document that connects to an SAP HANA Analytic View.
  • Change Lumira preferences for better readability.
  • Use the various regions to filter data at a global and chart level.
  • Create bar and line charts with Lumira based on different attributes across a couple of dimensions.
  • Create trend lines using a running average based on a measure.

I hope you have enjoyed this blog series. Be sure to check out my upcoming webinar where I will present the entire series on BrightTalk Sept 24 at 11am PST at

Best regards,

Bill Ramos

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Lars Breddemann
      Lars Breddemann

      Hey Bill,

      well done!

      This is a really nice example for a full end-to-end example that doesn't leave out critical parts.

      I really like the "here's how you can do it as well"-approach.

      Thanks for all the effort (which I know is way more than what the final blog post looks like).

      Cheers, Lars

      Author's profile photo Bill Ramos
      Bill Ramos
      Blog Post Author

      Hi Lars,

          I'm glad you liked the series.



      Author's profile photo Vivek Singh Bhoj
      Vivek Singh Bhoj

      Hi Bill,

      Thanks for posting such a great blog series, got to learn a lot from your blogs.

      Looking forward to your presentation at BrightTalk today.



      Author's profile photo Former Member
      Former Member

      Great analysis for the Data Geek Challenge, Bill!

      You can enter here:

      Author's profile photo Bill Ramos
      Bill Ramos
      Blog Post Author

      Thanks for the tip - I'm now entered!

      Author's profile photo Nic Smith
      Nic Smith

      Awesome Data Geek entry!

      Author's profile photo Bill Ramos
      Bill Ramos
      Blog Post Author

      Your welcome - the great thing is that three months of Wikipedia data is out their for the picking. 🙂

      Author's profile photo Eduardo Rezende
      Eduardo Rezende

      Very good analysis Bill!

      Author's profile photo Former Member
      Former Member

      Hi Bill,

      Fantabulous work!


      Hari Suseelan

      Author's profile photo Former Member
      Former Member


      I recognize that this is a comment on an old posting, but I noticed that you did not use the Calculation View that you created in the previous post (Building an Analytic & Calculation View from the Wikipedia HANA tables for use with SAP Lumira").  Is this a limitation of the HANA version and Lumira?  For a host of complicated reasons, I'm stuck for a while using an older version of HANA.  It seems that SAP Lumira cannot access Calc Views on older versions of HANA.  Newer versions (80s) seem to work just fine.  Is there, by chance..., a work around for using Calc Views on older versions of Hana (63) in SAP Lumira?

      Thanks so much,

      Peter Hanson

      Author's profile photo Bill Ramos
      Bill Ramos
      Blog Post Author

      Hi Peter,

        Back when I did this post I originally used a calc view. In a quest to make the post as simple as possible, I switched to the simpler Analysis view. I'm don't know about the version issue since I'm always upgrading my cloud based instances to get the most out of the latest versions. 😉



      Author's profile photo Vishal Soni
      Vishal Soni

      Really an informative blog !!!