Tuesday, August 30, 2016

Free Power BI visuals

OKVis is out to enhance and extend custom visuals and tools for Power BI. And they are offering it free of charge - under the listed MIT License. When we last checked, they had six (6) custom visuals listed:

  • synoptic panel
  • smart filter
  • sparkline
  • bullet chart
  • card with states
  • candlestick

If you are using Power BI, be sure to take a look. And give a thumbs up the the sponsor of OKVis - sqlbi (http://www.sqlbi.com/). You can find both the visuals and the tools here:  http://okviz.com/.

ROLAP - now a viable option

The time for ROLAP has arrived:


Most operational data stores (ODS) and data warehouses (DW) reside on a rowstore relational database. It's a great tool for data organization, but rowstores and their related indexes don't mesh with the demanding needs of analytics, business intelligence, reporting and self-service oriented cubes. So it was not uncommon to push selected data down from the data warehouse into customized MOLAP cubes. MOLAP cubes offered business analysts great self-service data mobility, usually using a connected EXCEL pivot table, or more expensive tools such as Tableau.

Ideal for the analyst, but pushing data down from a data warehouse or operational data store to a MOLAP cube was lots of added work, risk and most importantly, loss of data timeliness. Once the data warehouse or ODS was updated, yet another process had to be started to update and process the MOLAP cube. Once a day updates were not uncommon for MOLAP cubes. Fast data it was not! And if you have reviewed the literature on large MOLAP cubes, you've found that they can get unwieldy.

MDX was another road block. Using a BI tool such as Excel, analysts were shielded from the sometimes complex MDX commands. But problems arose when analysts wanted to do custom queries against the MOLAP cube. Queries that would be far easier against a traditional data warehouse using SQL.

Columnar databases to the rescue.


With its release of SQL Server 2016, Microsoft has a full featured relational database that can be run as a columnar database. By simply upgrading to SQL Server 2016, and converting your existing rowstore indexes into a columnstore, your data warehouse or ODS can now support a ROLAP cube. Efficient and fast. And no more MOLAP processing.  Here at Realized Design, we have done some limited testing using ROLAP, and have been pleased with the results. For the relational backend, we have used both SQL Server 2016 and the specialized analytic/columnar database EXASOL. In both cases, ROLAP proved comparable to a MOLAP design. But without all the extra processing. And thus far more elegant. You can find a detailed analysis of our work so far with EXASOL here: EXASOL review at RealizedDesign.

But don't just take our word for it. Here are two additional links where individuals have successfully used ROLAP cubes against very large databases. And they have been please with the results.

In 2014, Karen Gulati did exploratory ROLAP work using SQL Servers new column store indexes. See: Harnessing the Power of both worlds.

Also in 2014, Hilmar Buchta did some work with SSAS ROLAP against an MSFT Parallel Data Warehouse  See:  Parallel Data Warehouse (PDW) and ROLAP - Hilmar Buchta. 


So, just when you thought SSAS multi-dimensional was dead, its back!

Next Steps:  Build an SSAS ROLAP Cube using EXASOL

Monday, August 29, 2016

PolyBase Error ...app.MRAppMaster not found

On the HortonWorks community site, we noticed an unusual error relating to the PolyBase pushdown capability and the resulting error:


Error: Could not find or load main class org.apache.hadoop.mapreduce.v2.app.MRAppMaster
 

We have not seen this error, but wanted to include it in our listing of identified PolyBase errors. The user later noted that their solution required a change to the mapred-site.xml file, as follows:

       
 <property> <name>mapreduce.app-submission.cross-platform</name> <value>True</value> </property>
       

You can find the full user thread here:  Yarn ClassPath Value for Polybase Pushdown

Wednesday, August 17, 2016

EnableRolapDistinctCountOnDataSource

We are digging into SSAS ROLAP, and based on our research, the setting that enables the database engine to manage distinct counts should be updated to 1. To adjust this feature, you have to modify the ini file and then restart the SSAS engine.

Why we made the change


Our research found two key postings, both respected SQL Server professionals:

In 2014, Karen Gulati did exploratory ROLAP work using SQL Servers new column store indexes. One key finding was to update the EnableRolapDistinctCountOnDataSource setting to 1. See: Harnessing the Power of both worlds.

Also in 2014, Hilmar Buchta did some work with SSAS ROLAP against an MSFT Parallel Data Warehouse, and determined to update the setting.
See:  Parallel Data Warehouse (PDW) and ROLAP - Hilmar Buchta.

Summary

  1. Locate msmdsrv.ini
  2. Make a backup of the original, unaltered ini file. (backups are our friend)
  3. Locate <EnableRolapDistinctCountOnDataSource>
  4. Change the setting to 1
  5. Save the file and restart SSAS

Details

msmdsrv.ini

Locate msmdsrv.ini and make a backup. Typically it is located in the folder: 
C:\Program Files\Microsoft SQL Server\MSASxx.MSSQLSERVER\OLAP\Config
(where xx is the version)

Make the Change

Locate the entry for EnableRolapDistinctCountOnDataSource, make the change and save the file.
With the change made, restart the SSAS service.

Before
       
    <EnableRolapDistinctCountOnDataSource>0</EnableRolapDistinctCountOnDataSource>

After
       
   <EnableRolapDistinctCountOnDataSource>1</EnableRolapDistinctCountOnDataSource>

FIX: SSAS 2012 to back-end SQL Server 2014

We are not using this configuration, but since we did stumble upon it, we just wanted to make a note of it in case any readers are using this configuration.



Tuesday, August 16, 2016

Free Power BI eBook Manual

Microsoft Press is offering a free ebook on Power BI. And at 176 pages, it is not a lightweight book. Starting off with an introduction that covers the basics, it goes deeper into how to share the dashboard, refreshing the data, using Power BI Desktop and building a data model.  It called Introducing Microsoft Power BI and its worth downloading and using as a daily reference. You can find it here:  Free ebook: Introducing Microsoft Power BI.

Monday, August 15, 2016

ROLAP Polling Query - use a change tracking table

Setting up the polling query for our real-time ROLAP cube against an EXASOL database, we used an easy, but very bad practice approach.  We set our polling query directly against a fact table. Nice and easy for testing and proof of concept. Production? don't consider using it.

Polling a count against a small or medium size fact table might won't create much of a problem. When the dataset is huge it might take more resources.  So, when the data set is really large, and our goal is very near real time, why not poll a very small table.

Data Change Table

Let's call it TrackDataChange.  A minimalist version will have just a few columns:  the source system that loaded the data, the load date and a primary key ID. The only difficult part is you have to configure your ETL process(es) to insert a single row to your new TrackDataChange table. The new record simply marks that the ETL process has completed.


With the TrackDataChange table in place, and your ETL processes configured to insert a row after inserting new fact table table, your polling query will look like this:

        SELECT COUNT(*) FROM DWTEST.TRACKDATACHANGE;

You'll probably want more than just the basic columns. The key point is to run SSAS's polling query against an independent table dedicated to tracking fact table changes.

Pros

the polling query avoids data tables used for data analysis
the TrackDataChange table is narrow and holds few records
the TrackDataChange table is quick to query
the TrackDataChange table is quick to insert into

Cons

the ETL process is marginally more complex

Thursday, August 11, 2016

Database Lifecycle Management

On its website, Redgate has posted an overview on Database Lifecycle Management.  It's a real problem, and one that has note been completely solved.  Application code can be ripped out, and replaced wholesale.  Not so with the database. While there are bits of what we might call code, the database is really the data, with a small bit of code. But once setup, it's live.  There are no cut and paste approaches.  Changes have to be well understood, and implemented with caution.  Redgate's whitepaper can be found here:  Solving the database deployment problem with DLM.

They also have a free DLM tool, called DLM Dashboard. while it is part of the full SQL Toolbelt, you can download just the DLM Dashboard for free.  Redgate is a great operation, putting a lot of effort into supporting SQL Server, including its sponsorship of http://www.sqlservercentral.com/.
You can find the DLM Dashboard here:  http://www.red-gate.com/products/dlm/dlm-dashboard/.