Batch processing is available in Analysis Services. Which means we can send multiple processing commands to the server in just a single SQL Server Job. With SSAS batch processing we can control which objects to be processed and in what order in a batch. As batch processing reduces the amount of time taken to commit changes it offers better data availability. We can easily generate XMLA codes for batch processing through SSMS (SQL Server Management Studio). You might see lots of discussions about this in other websites and lots of them are saying you need to right click on the objects one by one and generate the scripts. Then put all scripts together in another XMLA script. But it is such a pain when you have lots of objects that should be selected one after another to generate the batch processing XMLA. Sadly, it is not the end of the story. You need put all scripts together by copying and pasting the scripts several times. Today I want to show you a very easy to the job which saves lots of your time.
I’m using “Adventure Works 2012 Multidimensional” as an example and I’m going to batch process some dimensions.
Continue reading An Easy Way for SSAS Batch Processing
First of all I’d like to explain what a Role-playing dimension actually means. Then I’ll express the way you can implement it in a SSAS tabular model.
When you link a dimension to a fact table several times for logically distinctive roles you’re using a role-playing dimension.
The key points are:
1. You are linking a fact table to a dimension multiple times. The relationships are defined by linking multiple foreign keys in the fact table to a single key in the dimension table.
2. Each linkage represents a single role or concept
The most popular role-playing dimensions are DimDate and DimTime.
NOTE: The sample is from Microsoft “AdventureWorksDW” for SQL Server 2012 and might be different from your own data warehouse design.
For instance, in a sales system that you have something like FactInternetSales fact table which has several links, or relationships, to a DimDate or DimAddress for distinct concepts like “Order Date”, “Ship Date” and “Due Date”.
As you see, all of the above columns obviously represent different meanings of date. In the data warehouse design you’ll see something like this:
Although this is absolutely OK in the relational database layer, but, this sort of relationship is NOT permitted in the tabular model, so what should we do?
Continue reading Role-playing Dimension in SSAS Tabular Models
As you might know SSAS tabular models do not support composite keys so you always must have just one column to make a unique row through the whole table. This is such a pain especially when you are new to the tabular models and don’t have that much detail information about it. So when you import some tables with existing relationships based on composite keys, the Table Import Wizard will ignore those relationships.
So what should we do to solve the problem?
The solution is to combine the values of the composite keys.
Here is how you can do the job?
· Creating a view on top of the source tables:
1. If you’re using SQL Server 2012 and above you can use the “concat” function to combine the values. The function combines several expressions regardless of their data types. So you can use it like this select CONCAT (1, 1.22100001,‘First’) SQL2012 and the result would be something like this
2. If you’re using earlier versions of SQL Server then you need to mind the data types. So for the above sample the SQL code would be select cast(1 as char(1)) + cast(1.22100001 as char(10))+‘First’ SQL2008 . As we expect the result is the same.
· Adding a new computed column to all tables involved in SQL Server before importing the tables to the tabular model
· Adding a new calculated column to all tables involved after importing the tables to the tabular model
As a quick note, you’ll need to remove the existing relationships imported from SQL Server and create the new relationship based on the combined keys.
You’ve changed something in your Tabular model and you’re facing an ugly “Error: Object reference not set to an instance of an object.” message, don’t rush. Just go to the table you’ve made some changes and click on “Partitions” button.
Then click “Refresh Preview” button and click OK.
You are working on a BI project that involves SSAS Tabular model. As you cannot process the model manually you need to develop a solution to process the model automatically. There are two scenarios here:
- You have an up and running SQL Server Integration Services (SSIS) instance: In this case you can build a SSIS package to process the Tabular Model.
- You do not have an SSIS instance ready on the server: So you need to create a SQL Server Agent Job.
In this post I’m expressing easy ways to solve the problem based on the above scenarios.
Using SQL Server Integration Services to Process SSAS Tabular Model
Follow the steps below:
- Create a new SSIS project using (SQL Server Data Tools) SSDT
- Right click on the “Connection Managers” area and select “New Analysis Services Connection”
Continue reading How to Automate SSAS Tabular Model Processing
SSAS 2012 supports three different approaches for creating a BISM (Business Intelligence Semantic Model):
a. Uses relational modelling constructs like such as tables and relationships
b. Uses xVelocity in-memory analytics engine for sorting and data calculations
c. Needs to use SSDT (SQL Server Data Tools) to implement
d. Can import data from relational data sources using OLE DB native and managed providers
e. Tabular solutions only support one model.bim file per solution, which means that all work must be done in a single file. Development teams that are accustomed to working with multiple projects in a single solution might need to revise how they work when building a shared tabular solution.
f. support DAX calculations, DAX queries, and MDX queries
g. Tabular model databases can use row-level security, using role-based permissions in Analysis Services (DAX implementation required)
h. It might be not a good choice for the systems that are going to load terabytes of data
Continue reading Three different approaches for creating a BISM in SSAS 2012, Tabular vs. Multidimensional vs. PowerPivot