SSAS Tabular Model - Partition Refresh and Schedule - ssas

I have 5 dimensions and a fact table in my DWH. Build SSAS Tabular Model cube and created Partitions for my fact table. Say 2015, 2016 and 2017.Then, deploy my cube in my server. And, I am creating a job to refresh my data for the partition 2017 alone. Not the entire data.
How to achieve this by scheduling a job to refresh all my dimensions and 2017 partition alone?
Thanks in advance. Please anyone.

If you want to process a specific partition you can do it with a xmla script.
How to retrieve it?
From Management studio, Right click on your fact and choose Partitions
Choose your partition (in my example I only have one) and click on the process icon.
Choose your partition
Select your process mode (In your case, process full)
Click and generate your XMLA code
Your XMLA Code:
Now you can create your job:
Otherwise you can create one SSIS Package and use an Analysis Services Execute DDL Task
I did some test and screenshot, but I saw that microsoft did already a nice explanation.
https://learn.microsoft.com/en-us/sql/analysis-services/instances/schedule-ssas-administrative-tasks-with-sql-server-agent
I hope that I helped you.
Regards,
Arnaud

Related

Processing OLAP cube using SQL agent and impersonation information

Yesterday I made some changes to an existing cube in SSAS. I added a new fact table to the Data Source View, which I linked to the appropriate dimension tables.
I then proceeded by opening up the mycube.cube [Design] tab and the section Cube Structure. From there I added a new measure group to the cube corresponding to the newly added fact table. I verified that the new fact table was implemented in the cube designer "scheme" and that the keys were correctly set.
I then saved the cube, waiting for the sql agent to process the cube during the night (it is a rather extensive cube, so I avoid processing it during office hours).
This morning I see that the OLAP cube has been processed, and that the sql agent's View history does not entail any errors or warnings.
However, the cube does not have the newly added measurement group. I made the same steps on a test server earlier, and that worked without any trouble.
The only difference I can see is the impersonation information in the Data Source. My questions are therefore:
If I make changes as a user in SSAS without deploying the cube from within SSAS, and I am not the user specified under Use a specific Windows user name and password under the Impersonation Information tab in the Data Source, will the changes not be made by the SQL agent?
Do I need to be the user which is stated as the Owner of the SQL agent task?
Regards,
Cenderze
First you have to make sure the edits you made to your cube are processed into the Job steps.For this, edit the Job and make sure the steps are modified considering your late edit.
Then to make sure a job is executed as a user particularly you may have to setup a Proxy account into the Job.This Proxy account needs the rights to read sources and to write into the Analysis Server's target.

Deploy SSAS Cube script across multiple cube instances

I have an SSAS cube in UAT with multiple changes. I need to now deploy these changes to each cube in live (10+ cubes all with the exact same schema). Then process each cube. What is the best way of doing this?
Currently we do this manually by opening up the changed UAT cube in BIDS, changing the Deployment destination (to point to each live cube), and click Deploy.
Can an SSIS package with a for loop calling an AS Processing Task handle this, for example? Are there XMLA (I don't know much about it) scripts that may be able to?
Thanks!
From SQL Server Management you can save the process of a cube as an XMLA script. Then you can either process it by executing the script or even create a job in SSMS. msdn.microsoft SSAS Administrative Tasks

SSAS: Can I define a Cube In BIDS, but create/process the partitions in SSMS/SSIS?

I am new to SSAS, and exploring Partitioning. My data source is very large (web logs):a few hundred million records.
I would like to define my cube IN BIDS, and create a SSIS Package to create partitions. For now, I am Generating The MDX to Create & process the partitions, and Executing them in SSMS.
I find that this is faster and less error prone them manually creating the partitions using the BIDS UI.
I am trying to understand the expected workflow: because every time I go back to BIDS, and make changes to measures & process the cube the partitions I created in SSMS are deleted and the old partitions I created in BIDS are re-published.
What I would like to be able to do is Refresh my partitions from the server to BIDS. Is This possible? If not, what type of workflow is expected in this case?
Thanks!
Partitions are part of the cube structure, and if you change these outside of BIDS, then you change the structure of the deployed Analysis Services database. BIDS keeps the definition of the structure locally as a set of XML files, the partition definitions are contained in a file with the extension .partitions. If you deploy an Analysis Services project from BIDS, it updates the deployed Analysis Services database to match the structure of the local XML files, thus overwriting whatever you changed outside of BIDS.
You can get a deployed database back to an Analysis Services project as follows: Open BIDS, click File/New/Project, and then select "Import Analysis Services Database" from the "Business Intelligence Projects" project type, and select the directory where you want to save the project files locally in the bottom part of the dialog. As soon as you click OK, a wizard opens that allows you to select the server and Analysis Services database to get the definition from, and when you click Next, starts writing it to the directory that you selected.
Partitions are a part of your cube structure. You should create the partitions in BIDS and then process them based on your requirement using SSIS or SSMS.

SSAS - script partitions possible?

I was recently tasked with partitioning a large cube and I ended up creating 15 partitions on several measure groups. It's sped up the processing time considerably. This was done in BIDS on a development copy of the cube. My question is on deploying to the production cube. Some other changes have occurred in production while I was working on this and I don't want to overwrite them so I can't just deploy the development project to production. Is there a way for me to script just the partitioning I performed on the development cube and apply that script to the production cube?
Thanks in advance
You can implement SSIS package to automate this task. A simple example could be found here http://www.ssas-info.com/analysis-services-scripts/1622-script-to-automate-ssas-partition-management-sql-ssis
You can automate the creation of partitions in your production cube using SQL Server Agent and the SSAS Partition Manager which can be downloaded from https://ssaspartitionmanager.codeplex.com/
With just a few lines of config, you can dynamically create cube and tabular partitions on your production server.

How do I process an individual cube partition

I've got a cube set up with a number of partitions - one for each year of data in my fact table. I'd like to process partitions on an individual basis. Is this possible? If so, how do I go about this?
Thanks
The easiest way to process a individual partition manually is the SQL Server Management Studio, where you can simply right-click any partition and select "Process". I guess this is not what you want.
How do you process your cube in the first place? If you use SSIS for instance, you could use a script transformation to generate an XMLA script that processes the individual partition. In the simplest form the script would only take an existing XMLA and replace the name of the partition with the correct value. We have done this in a project and it works very well. The generated script can the be executed with the SSIS XMLA task as well.
If you explain your requirements in more detail maybe I can help you better.
Nicolas
you can also do it from BIDS, go to the Partitions tab of your cube, locate the partition you want to process, right click on it and you'll see an option