Showing posts with label EXASOL. Show all posts
Showing posts with label EXASOL. Show all posts

Thursday, October 13, 2016

Analytic database comparison

We found an in-depth article that compares several of the leading analytic databases. So if you are in the market for an analytic database, this might be a good place to do some comparison shopping. We have personally taken a look at Exasol and found that it performs well. Find our postings about Exasol here:  Exasol postings at Realized Design.

The database engines compare include:





Below are the summary results from the web site. If you want the full details, you can find them here: [The site is in Russian, so you'll want to enable translation.]
Development → Comparison of analytical in-memory database.


Results reported are in seconds - lower is better:

Inquiry
Greenplum
Exasol
Clickhouse
Memsql
SAP Hana
Impala
N1
14
<1
-
108
6
78
N2
131
eleven
-
 -
127
Error
N3
67
85
 -
122
733
T1
14
1.8
64
70
20
100
T2
17
4.2
86
105
20
127
D1
1393
284 
-
45
1500
-
D2
 > 7200
1200
-
 > 7200
Error 


Clickhouse Benchmarks

On the clickhouse.yandex site, they list several benchmark tests comparing Clickhouse to several other analytic databases.  But - none of the queries JOIN another table.  So sadly, not a very useful comparison.  See:  https://clickhouse.yandex/benchmark.html

MemSQL vs. MySQL (w/ InnoDB)

Good read with thoughtful comments on comparing the two: https://dom.as/2012/06/26/memsql-rage/


EXASOL release version 6 and a Free Small Business Edition

This week, EXASOL released version 6 of their analytic database. We have had good experience with version 5, so we are expecting version 6 to continue to excel. While the latest version of EXASOL has numerous enhancements, the two we especially found interesting was the addition of a data virtualization framework and the rebranding of the Community Edition to the Free Small Business Edition.

Data Virtualization

Analytic databases like EXASOL serve as a double edge sword for massive amounts of data. Their scalability provide the ability to store large repositories of data -yet, for many analytic tasks, users require much smaller, more targeted data sets. The addition of the data virtualization framework just might be what is needed to segment data for targeted end users.

Free Small Business Edition

We suspect that is simply a legal rephrasing to allow organizations to feel they have the legal ability to run production systems using their Community Edition. To that end, we are pleased that this was done.

Other Items

  • Increased support for Hadoop
  • Improved connectivity
  • Expanded support for programming languages
  • Increased performance and scalability

You can read more about it here:

LinkedIn - Analyzing data fast - Sean Jackson
EXASOL Free Trail

Tuesday, August 30, 2016

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 8, 2016

Using Power BI to query EXASOL via ROLAP

You're using Power BI against an EXASOL analytic database. Unfortunately, the only connection currently supported uses ODBC (as of August, 2106). ODBC is a stable connector, but is generally considered to be slow. A native connector would be ideal.

Update July 2017:  GitHub has a Power BI Connector to Exasol project. it is still in beta, and it is NOT an official Exasol supported project. But, it was created by Thomas Bestfleisch, an Exasol Solution Engineer. You can find it here: GitHub - Power BI to EXASOL project.

Power BI does have native connectors to other systems, so might an EXASOL connector be in the pipeline?  Going to the Power BI Ideas section, where new features are requested and voted on, you do find a posted suggestion to create an EXASOL Direct Query Connector. (Power BI ideas - EXASOL Direct Query Connector). Unfortunately, it only has a nominal number of votes. Fortunately, you do have an alternative.

Virtual Data Mart - using ROLAP




EXASOL has an OLAP Connector for SSAS that allows Microsoft shops to create virtual data marts. Using SSAS's real-time ROLAP protocol, you can setup a virtual data mart against an EXASOL analytic database. SSAS's ROLAP provides an intermediate bridge between Power BI and your EXASOL database. This has multiple benefits

  • Curate analytic data into targeted virtual analytic cubes (or single if need be)
  • Add a layer of security, when needed
  • Push processing down to the analytics database engine

We've already taken a look at SSAS ROLAP cubes using EXASOL.  You can find the details here:  Build an SSAS ROLAP Cube using EXASOL.




Friday, August 5, 2016

Partition Settings for our SSAS ROLAP cube using EXASOL

Here are the partition settings we used to set up our SSAS Real-time ROLAP cube using EXASOL as the relational database backend.  Read the full report here:  Build an SSAS ROLAP Cube using EXASOL.

1:  Using Standard settings, adjust the slider to Real-time ROLAP.


2: Under Options, on the General tab, we used the default settings, as listed below:


3: Under Options, on the Notification tab, we made the following adjustments:

  • Scheduled polling - select this option
  • Polling interval     - we set this to one (1) minute.
    You are after a balance between real time, and not overloading the database with excessive queries - there is no correct answer. And, this can be changed easily. See below.
  • Polling query - here we simply used a count(*).
    For our example it was:    SELECT COUNT(*) FROM DWTEST.FACTTESTSALES;
    against the fact table on the relational database. Note:  for production, run the polling query against a track data change table - see ROLAP Polling Query - use a change tracking table.




Making Live Changes to our ROLAP Partition

Once in production, you may decided to change the polling interval, or some other adjustment to your ROLAP partition. You can do that within SQL Server Management Studio.  ( make sure you are running the most current version of SSMS, which is a standalone tool - SSMS - Now a stand-alone, separate tool from SQL Server)

To make changes to the partition, follow these steps:

In SQL Server Management Studio
  1. connect to the Analysis Server
  2. locate the target partition
  3. right click - properties
  4. Proactive Caching - select on the left menu bar
  5. Options Button - select
You are ready to make changes to your partition.

 1:  Use SSMS to open the partition properties:


2: Select the Proactive Caching section, to get access to your ROLAP settings.



See our full report on building an SSAS ROLAP cube with EXASOL here:
Build an SSAS ROLAP Cube using EXASOL.





Thursday, August 4, 2016

Build an SSAS ROLAP Cube using EXASOL

For this post, we are building a real-time ROLAP cube using EXASOL.  For us, the concept of ROLAP, and the goal of a real time multi-dimensional data warehouse provided an ideal design. Use an analytics &  columnar based relational database for both the structured data warehouse and as the back end to our ROLAP cube.

As technology advances, real-time, or near real-time, analysis is becoming increasingly important. And while Hadoop, Big Data, and Data Science have captured most of the attention - cubes, or more specifically, multi-dimensional cubes are still a great tool. Upgrade the cube to real-time using ROLAP and it just gets better. On their website, EXASOL indicates support for use as the database backend to an Analysis Services (SSAS) Real-time ROLAP cube. We decided to take them up on it.

Overall, the process was straight forward.  First, implement a traditional star schema data warehouse in EXASOL. Load the data warehouse with SSIS, plus setup some test incremental data adds. Next, use SQL Server Data Tools to design and deploy a ROLAP cube. And finally, use EXCEL to connect with and test out our cube.

What we are looking for in this process:


  • Ease of data population, updates and data maintenance- using SSIS
  • Design and configuration of SSAS ROLAP cube using EXASOL
  • Usability - the Analyst experience


Data population, updates and data maintenance

Our primary focus is the ability to use an ETL tool to easily add supplemental records to the fact table. To simulate a near real-time data warehouse environment. And once added to the database, are the new records visible in our ROLAP cube? 

EXASOL supports both the legacy ODBC protocol as well as an ADO.NET connection. With both of these protocols, we were able to easily create and run SSIS ETL packages from our source data into the EXASOL data warehouse. For this exercise, we used the SQL Server Data Tools 2016 for Visual Studio 2015, without any problems. The version of the EXASOL ADO.NET Data Provider was for version 5.0.15.

As expected, using SSIS data loading preformed well, giving us the confidence that as a data warehouse, EXASOL could be easily maintained from a data management perspective. See - EXASOL - Using SSIS to load our Data Warehouse.

 Design and configuration of ROLAP cubes


Here we had our first speed bump.  The current version of SSDT 2016 for Visual Studio 2015 had multiple issues and would not properly connect to EXASOL  to create a new SSAS cube - so we pulled up an older version (1).  Using SQL Server Data Tools 2014 for Visual Studio 2013 - for an analysis services multi-dimensional project, we were able to easily setup a new Data Source connection to our EXASOL data warehouse using the ADO.NET data provider. Once connected, we could easily create a new Data Source View.

With our data source view in place and adjusted to our satisfaction, we could start cube design. We were pleased that the overall process flowed seamlessly. With no special adjustments required to support EXASOL. Since ours was a ROLAP cube, rather than a more common MOLAP, partitions required more attention.

(1) I have been informed by Mathias Golombek, CTO, that they are working on an updated ADO.NET driver to resolve these issues.

Real-time ROLAP, with Options

In Partition Storage Settings, we chose the standard Real-time ROLAP setting. Our only adjustment beyond this was to set up the Scheduled Polling settings in the Notifications section. Here, the polling interval was set to one (1) minute, with the polling query set to do a count against our fact table. One minute is good for near real time.  If needed, you can shorten the polling interval granularity to a matter of seconds. With our interval of one minute, our scheduled polling worked as expected. After running an incremental fact table update, the latest records were visible in the ROLAP cube after the interval wait time. For more detail on the partition settings used see: Partition Settings for our SSAS ROLAP cube using EXASOL.

Usability

Every analyst I know uses Excel. And as a free form tool, it's great. It also connects to SSAS cubes, so it makes a good tool to test a user's experience. Sure Tableau might be better, but at a very high cost.

First off, the overall analyst experience was good and really no different than if the tool was connected to an SSAS MOLAP cube. For this test we are working with EXASOL's community edition VM, which limits our configuration to a single node.  Our single node VM configuration has four (4) virtual 3.07GHz Xeon processors and 15 GB of memory running on a dedicated spindle. Our fact table has slightly more than 11 million records, plus five dimension tables.  While 11 million records is on the smaller side for a data warehouse, it's not an unreasonable size for medium sized companies and divisions.  I know quite a few companies that would love to have over a million sales transactions a year.

Warming the Indexes

Looking over the user manual, there are no discussions on setting up indexes. And that is by design. EXASOL manages all indexes and optimizations internally. As users query the database, the optimizer determines what indexes and statistics it needs. And we found this out with our single node VM. As we simulated an analyst querying the database via Excel, the response improved rapidly. Where a first query might take several seconds, the follow on queries dropped to milliseconds. Essentially, user demand drove the optimizer.

But I need my hands on the Optimizer control

I understand. DBA's need to have the ability to make adjustments. But since most of you work with SQL Server, you already benefit from some internal optimization features. That's why there are fewer controls compared to Oracle. It's not that they don't exist. It's just that behind the scenes, a few very bright database guru's worked out algorithms that respond in real time. That's progress. A 1960's Jaguar E-type needs a full time mechanic. It is a great museum piece, but your daily car is probably more modern.  With both cars and databases, less is often more. 

Summary

With advancements in columnar relational databases, ROLAP should be back on the list of tools that support day to day operational business intelligence, analytics and reporting.



Tuesday, August 2, 2016

EXASOL - Using SSIS to load our Data Warehouse

We're using SSIS to populate an EXASOL data warehouse. In our case, the SSIS design is being done using the 2016 version of SQL Server Data Tools - for Visual Studio 2015 ( download the latest SSDT's here: Download SQL Server Data Tools (SSDT)).

Install the EXASOL ADO.NET Driver

If you have not yet installed the EXASOL ADO.NET driver, download and install it. Find the Download Section here:  EXASOL Download Section. These are ordered by version, so make a note of the version you just downloaded. We are using version 5.0.15.

ODBC:
EXASOL also has an ODBC driver, both 32 bit and 64 bit. You can opt to use this, rather than ADO.NET. Overall, the process is similar.

Data Types

The data types in EXASOL have distinct differences from those in SQL Server - especially dates. So before you get started, you'll want to map out both the source and target data types, along with any transformations required. For a comparison of EXASOL and SQL Server data types, along with methods on transforming data see: Load EXASOL from SQL Server: Data types & Conversion.

In general, we found that it's best to use a view in SQL Server, or a SQL Command as part of the OLE DB source task. You can also use a Data Conversion Task to make your conversions. However, we believe using the database engine is more efficient for these types of transformations.

Data Flow

Once you have your data sourced, converted, transformed and setup, the final step is loading data into EXASOL. First, create a new connection to EXASOL using the Connection Manager and the ADO.NET driver you just installed. It will look something like this:



ADO.NET Destination

Setting up an ADO.NET destination task to EXASOL is fairly straight forward, with just a few minor considerations. On the Connection Manager page of the ADO.NET Destination Editor, chose the desired connection. In our example, its 192.168.1.100:8563.sys.

No tables or views could be loaded

At least for now, the drop down combo box does not display a list of tables. No worries, just type in the name of the table, ideally using both the schema and the table name:  <schema>.<tablename>. The example below has TESTDATA.TESTDATA.




Preview

Use the Preview button to test the connection.  You should see a preview of your target table, along with a few sample records.


Mappings

Use the mappings section to verify or update the mappings, Identical names are mapping automatically. All others have to be done manually.


That's it. If you have any loading errors, focus on data types, and especially dates. We also found that tinyint required an explicit data type conversion.  See: Load EXASOL from SQL Server: Data types & Conversion.

Next Steps:  ROLAP - now a viable option
                     Build an SSAS ROLAP Cube using EXASOL

Tuesday, July 26, 2016

EXASOL from SQL Server: Data types & Conversion

We are working with EXASOL and that requires loading data using SSIS (SQL Server Integration Services). For this test, we are using the current version of SQL Server Data Tools 2016 along with Visual Studio 2015. EXASOL only has a limited set of data types, so creating destination tables requires a bit of planning.  And with the tables created in EXASOL, importing data from SQL Server requires some transformations.

EXASOL Data Types

From the EXAsolution user manual, section 2.3.1, Table 2.2 Overview of EXASolution data types:

Data Type
Notes
BOOLEAN

CHAR(n)
1 ≤ n ≤ 2,000;   ascii and utf8
DATE

DECIMAL(p,s)
 s ≤ p ≤ 36
 p ≥ 1; s ≥ 0
DOUBLE PRECISION

GEOMETRY[(srid)]
 srid defines the coordinate system (see also EXA_SPATIAL_REF_SYS)
INTERVAL DAY [(p)] TO SECOND [(fp)]
 1 ≤ p ≤ 9, 0 ≤ fp ≤ 9, accuracy precise to a millisecond
INTERVAL YEAR [(p)] TO MONTH  
1 ≤ p ≤ 9
TIMESTAMP
Timestamp with accuracy precise to a millisecond
TIMESTAMP WITH LOCAL TIME ZONE
Timestamp which considers the session time zone
VARCHAR(n)
1 ≤ n ≤ 2,000,000;   ascii and utf8

It's a short list, but DECIMAL, CHAR and VARCHAR end up handling the missing data types we need. At least for now. And EXASOL is an analytic engine - not storage for blobs or pictures. The following table outlines a few of the SQL Server data types, and the corresponding EXASOL data types.  Plus, a note about whether EXASOL will handle the implicit conversion, and what T-SQL or SSIS Data Conversions we needed, or used to load the data.

All and all, the overall process was fairly logical, except for dates. As we noted, we are using SSIS, and the EXASOL ADO.NET driver with the SSIS ADO.NET Destination task.

 Data Types:  SQL Server and EXASOL:  Equivalents and Conversion Steps



SQL Server
EXASOL
Implicit (1)
T-SQL
( view or SQL Command)
SSIS
Data Conversion Task
bit
BOOLEAN
yes
Not reviewed
DT_BOOL
int
DECIMAL(18,0)
yes
cast( mycol as Decimal(18,0))
[DT_NUMERIC] 
Precision 18; Scale 0, or DT_DECIMAL, with scale of 0

smallint
DECIMAL(9,0)
yes
cast( mycol as Decimal(9,0))
[DT_NUMERIC] 
Precision 9; Scale 0, or DT_DECIMAL, with scale of 0

tinyint
DECIMAL (3,0)
no (2)
cast( mycol as Decimal(3,0))
[DT_NUMERIC]
 Precision 3; Scale 0  (1), or DT_DECIMAL, with scale of 0

float
DOUBLE PRECISION
yes
Not required
Not required





money
DECIMAL(18,4)
yes
cast( mycol as Decimal(18,4))
[DT_NUMERIC] 
Precision 18; Scale 4 , or DT_DECIMAL, with scale of 4
Decimal(x,y)
DECIMAL(x,y)
n/a
None required
None required
Nvarchar(x)
VARCHAR(x) utf8
n/a
n/a
n/a
Varchar(x)
VARCHAR(x) ascii
n/a
n/a
n/a
datetime
DATE
no (3)
convert(varchar, mycol, 101)
(6)
datetime
TIMESTAMP
no (4)
convert(varchar, mycol, 101)
[Time defaults to 00:00:00.000]
(6)
datetime
TIMESTAMP
no (4)
convert(varchar, mycolumn, 101) +  ' ' +   STUFF (convert(varchar, mycolumn, 114), 9,1,'.')

(6)
Varbinary(max)
No support
no




Notes

(1)  No Cast or Convert required, but the optional T-SQL or SSIS Data Conversions will minimize conversion risk.

(2) tinyint conversion SSIS error message:  [ADO NET Destination [2]] Error: An exception has occurred during data insertion, the message returned from the provider is: No conversion for parameters with this type System.Byte

(3) datetime implicit conversion SSIS error message:
[ADO NET Destination [2]] Error: An exception has occurred during data insertion, the message returned from the provider is: data exception - invalid character value for cast; Value: '01.06.1996 00:00:00' Format: 'MM/DD/YYYY' in write of column FACTTESTSALES.ORDERDATE (Session: 1540926262556380170)

(4) datetime implicit conversion SSIS error message:
[ADO NET Destination [2]] Error: An exception has occurred during data insertion, the message returned from the provider is: data exception - invalid character value for cast; Value: '01.06.1996 00:00:00' Format: 'MM/DD/YYYY HH24:MI:SS.FF6' in write of column FACTTESTSALES.ORDERDATETS (Session: 1540926166351754250)

(5) VARCHAR(x) ascii equates to a conventional varchar().  VARCHAR(x) utf8 equates to nvarchar(x).

(6) Consider using a Derived task.  But, doing the conversion in the database engine using T-SQL will be far more efficient. You can do this in the OLE DB Source task by using a SQL Command, rather than using a "Table or View" data access mode. If you do use the "SQL Command" option, and you later modify your SELECT such that is changes a data type [ for example: convert(varchar, mycol, 101) ], expect problems and see our note below: SQL Command Data Type Mismatch - Error.


Dates

Importing date data into EXASOL using SSIS is a bit more challenging.  And so far, we have found only a few approaches that work, and many that do not. If we look over the error messages returned back from SSIS from some failed import attempts, we see that the EXASOL ADO.NET driver is looking for this format:  



                'MM/DD/YYYY HH24:MI:SS.FF6'


To replicate the MM/DD/YYYY, in SQL Server use T-SQL:

  convert(varchar, mycolumn, 101) 

This does not return any time value, but will be accepted both by the DATE and the TIMESTAMP data types in EXASOL. To add the time value, it requires this T-SQL: 


  convert(varchar, mycolumn, 101) + ' ' +               STUFF(convert(varchar, mycolumn, 114), 9,1,'.')


STUFF?

Look closely at the time section of the required format.  "...MI:SS.FF6'"  Notice the period, and not the colon between SS and FF6.  The T-SQL CONVERT( , ,114) statement returns a colon between SS:mmmm, while the desired value requires a period. Very unfortunate. Also notice that one of the T-SQL CONVERT() ODBC formats (121) and the ISO formats (126, 127) have the desired millisecond format. Unfortunately, the date format may not work. Possible reasons to consider an ODBC connection rather than an ADO.NET connection - at least for processes with a small number of records.


SQL Command Data Type Mismatch - Error

You are using the SQL Command option in the OLE DB source task,  And the error message still tells us our date is formatted incorrectly.  Check the Metadata in the Data Flow Path Editor (see below).

When you use the SQL Command option, and you CHANGE the date type in your SELECT, the source task does not change the outgoing data type (bug).  Say, when you need to add a CONVERT statement to a datetime value - as we outlined above. Let's call it an SSIS bug. (note, we are using SQL Server Data Tools from SQL 2016 - earlier versions may not have this problem).

Fix: delete the OLE DB Source Task, create a new task, add back your updated SELECT, with the corrected data types, and connect it to your work flow. And verify that the outgoing data types are what you need.





Implicit (or direct) Date conversions that do not work, at least so far:

Naturally, you will be using one of the above CONVERT statements to convert your SQL Server date data into EXASOL. Or perhaps you have worked out one of your own. 

The following just lists our the various direct or implicit conversions that we have tried and do not seem to work. For reference, here are the date conversions that we have found that do not work, at least with SSDT/SSIS 2016 and EXASOL 5.0.15.


  
SQL Server
EXASOL
SSIS Conversion/Import
Datetime
DATE
No
Datetime
TIMESTAMP
No
Date
DATE
No
Date
TIMESTAMP
No
Datetime2
DATE
No
Datetime2
TIMESTAMP
No
SmallDatetime
DATE
No
SmallDatetime
TIMESTAMP
No
Datetimeoffset
DATE
No
Datetimeoffset
TIMESTAMP
No

And, these CONVERT statements did not work either.

ISO:         convert(varchar, OrderDate, 112)
ANSI:        convert(varchar, OrderDate, 102)
Others:      convert(varchar, OrderDate, 104)
             convert(varchar, OrderDate, 100)
             convert(varchar, OrderDate, 113)


Next Steps: EXASOL - Using SSIS to load our Data Warehouse