Is it possible to "unprocess" a cube in SSAS to retrieve only the metadata? - metadata

I would like to know if it's possible to "unprocess" a cube in SSAS. I want to do this so I can perform a "synchronization" between two differents servers. This (I think), will remove all the data and left the metadata to be synchronized? Am I right?
Do you know a way to do this?
Thanks!

There is the ability to unprocess, although that'd leave your cube unprocessed. Right-click database, select process, in the next window change process type to Unprocess and "Script to new window" in top-right.
If you just want a schema though, can you not script the "Script Database as Create" XMLA? Then drop your target and run the Create XMLA against the target server?

Related

Snowflake schema training question Badge 1: Data Warehousing Workshop Lesson 3 Challenging Lab

I'd like to get answer to this question on snowflake training "You created the schema called VEGGIES but when you run the SHOW SCHEMAS command (see above) it does not appear. Assuming your current worksheet role has access to the schema, what options below would make the schema appear in the results?" Selections are below, and select all that apply.
Change your default role to SYSADMIN (and run again).
Set the worksheet database drop menu to GARDEN_PLANTS (and run again).
Set the worksheet warehouse drop menu to VEGGIES_WH (and run again).
Add "all" to the show schemas command (and run again).
Add "in account" to the show schemas command (and run again).
Add "where schema = 'VEGGIES' " to the show schemas command (and run again).
Thanks!
Hint is to reference to the photo above the question. Remember that you are currently in SYSADMIN role and notice the selected database applied.
Apply what has been selected to your own worksheet. Test the answer choices one by one and you'll notice some answer choices aren't real steps to take. The question wasn't necessarily hard, but I also spend some time on this b/c I didn't digest the question/answer choices slowly and carefully.
Check the 2nd and 5th checkboxes:

SSAS Tabular - Deploy to multiple models

We are trying to create a SSAS tabular model for 60-100 customers.
In regards to creating a single model and process all customer's data is time consuming (until the data refresh is finished,each and every customer need to wait for the latest data - we update every 15 min).
However creating multiple tabular models is easy to re process and trouble shoot but difficult to maintain or deploy changes. If I need to add new measures or tables,I would like to apply to all the models.
I was wondering if anyone can suggest best way to deploy changes/additions across different tabular models.
If you've worked with SSIS this can be used to deploy across multiple sites. An overview of this is below. What this will do is take a list a server names that you supply, iterate through them, and execute the DDL for the updated Tabular model to each one. This same method can also be used for cube processing, with the create DDL replaced with a processing script. If the model is deployed to a server for the first time ensure that it's processed before it's queried or used by any client tools, and make sure the processing of changed objects is handled accordingly as well.
When connected to SSAS in SSMS, right-click the model, select Script > Script Database As > Create or Replace To > then choose where to output the Script. Note that this will not include the password for security purposes and this will need to be handled accordingly.
Create an SSIS package. In the package create an Analysis Server Connection Manager. This can be set to a server where this Tabular database currently exists.
Create a String variable and leave in blank. This can be called DeployServerName. Also create an object variable, which can be called ServerList. On the SSAS Connection Manager, go to the properties window (press F4), then select the Expressions ellipsis. On the window that comes up, choose the ServerName property and set the DeployServerName variable as the expression. This will allow the server name to change to multiple servers for deployment.
Add an Execute SQL Task in the data flow. This is where you will get the server names to deploy to. If they're stored in a master/lookup table just select the column holding the server name as the SQL statement. You can also add the destination server names individually with UNIONs selecting plain text.
Example
SELECT 'Server1' AS DestServer
UNION
SELECT 'Server2' AS DestServer
On the Execute SQL Task, set the ResultSet property to Full Result Set. Then on the Result Set pane, enter 0 for the Result Name and the object variable created earlier (ServerList) for the Variable Name field.
Next create a Foreach Loop after the Execute SQL Task and connect this to it. Use the Foreach ADO Enumerator Enumerator type and select the object variable (ServerList) as the ADO Object Source Variable. On the Variable Mappings pane, place the string variable (DeployServerName) at Index 0.
Inside the Foreach loop add an Analysis Services Execute DDL Task. Use the SSAS Connection manager you created as the connection, Direct Input as the SourceType, and enter the script generated in SSMS as the SourceDirect statement.

How to call a sas dataset by its label or where to check its name

I have a problem in dealing with SAS Enterprise Guide that runs on the server of my client.
I do not have access to the libraries so, in order to use the datasets the only thing we can do is to store them on the local disk C: of the computer and drag them to SAS.
We can not create libraries because the server does not read local paths.
Once you drag a table, let's call it "mydata" in SAS, the table is automatically renamed "mydata9865" with random numbers at the end and "mydata" is its label.
If you right-click the table and go to properties, you can't find the name of the table, just the label.
The only way I found to check the real name of the dataset is to open the Query Builder and check the name in the code preview.
The problem is that I am dealing with tables of millions of records and the machine I am using is very slow, so whenever I want to open the Query Building, just to check the table's name, it takes sometimes even an hour.
I am not a SAS expert, so I am sure there is a smarter way to do so. Is it possible for instance to use the table by calling it with its label?
data mydata2;
set mydata;
run;
instead of
set mydata9865?
Or is there some place I can rapidly check the name of the table without going through the query builder?
I tried to google it but I can't find anything, I hope someone will be able to help me!
Thank you in advance
Hover the mouse pointer over a data node to see it's attributes. The data set name is the File name: value.
For example:
In this example I had renamed the nodes created by two different queries to be the same (doable:yes, smart:maybe not). NOTE: A data node Label: is not necessarily the same as it's underlying data set's label metadata.
Regarding
use the table by calling it with its label?
Two nodes can have the same label, and is a a situation that defeats this approach.
Use the COPY task to upload your data explicitly. It sounds like you're not adding your data to the projects properly so SAS automatically assigns a name, rather than if you explicitly import or load your data.
Problem solved! I should have simply upload the data to the server with Tasks->Data->Upload Data Sets to Server but I didn't know this task so I didn't know it was possible to do it at all!
https://communities.sas.com/t5/SAS-Enterprise-Guide/Importing-sas-data-sets-from-C-drive-into-SAS-EG-not-possible/td-p/135184
Thank you everybody for you help!

Edit and save the publish file ssdt

Is there a way to customize and save publishing scripts in a Database project?
If I want to modify some columns and this might incur data loss, or the other way around I want to populate columns in order to be able to modify the column type (to not null) how can I do that with SSDT in visual Studio 2013?
Modify Columns w/ possible data loss - you'll need to enable the option when publishing to allow possible data loss or that won't be run.
Populate columns to modify - best way would be a pre-deploy script, probably checking to make sure that there are NULL values to update before doing the update. You'll need to add a script of type pre-deploy if one doesn't already exist, then either drop your code straight in that script or create a new script of type "not in build" and include that file in the pre-deploy script.
http://schottsql.blogspot.com/2012/11/ssdt-pre-and-post-deploy-scripts.html

how to figure out which columns in the fact table are used for calculating measures in an OLAP cube?

I have to verify that olap cube data and the data from relational tables from where a cube is built is correct.
And I will do so by writing the TSQL queries and compare the values with that of cube.
But, I got stuck in the course of determining which columns are used for measure. How do I figure out which columns are used for measures?
Help appreciated!
You need to look at the cube metadata.
For SSAS2005, take a look at the DSV (data source view) and mappings to dim and fact table values behind the scenes. This should allow you to see what is going on. If you don't have a project you can reverse engineer it using the 'import anslysis services template' (or some such) option from the new project dialog in BIDS.
Calcuated measures are defined in the cube script. If you have a reverse-engineered cube or cube project you can open the cube and see this in the 'calculations' tab.
For AS2000 you can open the cubes on the server (assuming sufficient permissions) and look at the mappings there. There is a tool called OLAPScribe that will help you do this for AS2000. Alternatively you can run a trace on the source database and capture the SQL generated by the cube as it is processed.