New mondrian cube not available in XMLA pentaho - mdx

I have a mondrian cub xml schema file. I have used it a a basis for an Analysis DataSource. I can query the thing file with Saiku, and everthing works fine.
However, when I use olap4j and try to connect to it via the xmla connetor, it does not show up in the list of cubes. Other cubes show up and can be queried. I set the EnableXmla parameter to true.
Code:
NamedList<Catalog> c = oConnection.getOlapCatalogs();
NamedList<Schema> l = oConnection.getOlapSchemas();
Schema schema = oConnection.getOlapSchema("myCube");
NamedList<Cube> cubes = schema.getCubes();
When I print out the list of Catalogs, I can see it, but only one Schema and only one Cube are listed when I print them out. (Not the one I want of course)
I have refreshed and rebooted the server. Is there anything else I need to do?

Related

SSAS creating cubes dynamically from XMLA

Is it possible to create cubes from XMLA just by replacing the the database and table names?
What I mean is that when you generate from one cube the script to create it, just replace all the related references to tables and database and change the datasource connection string. Now all the tables exist in the other database, I should be able to create a similar cube like this, right?
Basically you can do that but you should be careful not to break it. The XMLA for creating a cube is a whole description of the cube including calculated members, datasource, tables etc. If you want to change just the datasource connection string it is easy. Just one row in the XMLA file and it will work properly.
To change table names etc is very error prone - no matter if you do it by hand or using some regex. If you don't want to redesign the cube and the datasource in visual studio you can try with modifying the XMLA just be careful. Also keep in mind that in that XMLA (generated for example with Script database as create statement) you might also have users/roles/active directory IDs and stuff like that and if you move to another environment some of these might need to change also.
In the end when you try to process you will see if everything worked fine ;)

How to transfer data from Tabular model (SSAS Tabular) to Relational Database?

I am new to SSAS and Tabular model cubes. I have a data migration task that aims to import data from a Tabular model into a SQL Server database.
I have tried SSIS with not success. Using OLEDB Data source connected SSAS instance with Tabular database, I configured the data source to execute and MDX command " evaluate ('Tabular Table Name') ". It returns successfully but only partial number of records (around 1000) are returned. So i reconfigured the data source to use OPENROWSET and selected the tabular table that i want to query but I am always getting an error related to Column mapping, even though the column mapping is correct.
Okay, I suggest you try this way (I tried it with our PowerPivot databases, which is pretty similar to SSAS Tabular_:
Run SSMS and connect to SSAS Tabular instance
Right-click the database you want to dump into SQL Table and select Script -> Create to -> New Query Window. Be patient and wait until SSMS generates XMLA script for you
Find SQL queries that were used to fill SSAS tabular tables by searching XMLA script (keyword = QueryDefinition)
This is what I got for our database:
<Partitions>
<Partition>
<ID>factLinksSeller_484c3291-2123-4391-8627-fd4b584d1726</ID>
<Name>factLinksSeller</Name>
<Annotations>
<Annotation>
<Name>IsQueryEditorUsed</Name>
<Value>True</Value>
</Annotation>
<Annotation>
<Name>QueryEditorSerialization</Name>
</Annotation>
<Annotation>
<Name>TableWidgetSerialization</Name>
</Annotation>
</Annotations>
<Source xsi:type="QueryBinding">
<DataSourceID>15719e99-95fb-44c1-8399-18a769ae1be4</DataSourceID>
<QueryDefinition>select
*
from
dbo.factLinksFull X
where X.signaturePersonID=16
</QueryDefinition>
Now you can use this queries to load data into your SQL Server DB via SSIS
Even if you filled Excel files by external tool, after importing them to SSAS this data should be stored somewhere, so you could check it in XMLA script and make the decision what to do next
There exists a much more simple way to do it, if you have local PowerPivot workbooks and your memory can handle datasets from those:
Open your PP workbook, run PowerPivot
Switch to Data View
Copy whole table from the tab you are on, by pressing icon in the left upper corner of it, then press CTRL+C and wait for the data to be transferred to the memory
Paste your data in another Excel 2013 file, since they now can handle almost any size of data, or MS Access table. Then import data to SQL Server

SSRS Report Data Source for Query with Multiple Databases

I have a dataset that pulls from multiple databases on the same server. Historically (without doing research) in this case I would set the data source to ReportServer (the database that houses the execution log for the server, ect.) and noticed the dataset doesn't seem to care what the data source is.
I did a few hours of digging and couldn't find an answer. When using (or in my case, unioning) multiple data bases in a dataset, what should the dataset data source be in Visual Studio?
Specifying the database in the connection string sets the starting, default database for the query. If your permissions are adequate, then there is nothing to stop you from accessing other databases.
The database in the connection string will give your query the context that is used when you don't specify a database name as part of a table. If your query is simply:
SELECT * FROM vw_Interactions
then this will run against the database specified in your connection string.
For your case, when using a table with the same name across multiple databases, the default database doesn't matter much, as long as the data access account has permissions that let the query work.

Rename Catalog and Cube name in Analyzer

I have one query regarding pentaho cube:
Lets assume a cube (say sample ) with schema name as schema1 and cube name as cube1. I renamed
that schema and cube to schema2 and cube 2 respectively and published on schema workbench.
As my analyzer was earlier pointing to schema1 and cube1.. so inorder to make it functional, i also updated catalog entry to schema2 and cube entry to cube2.
Now when i try to run analyzer it is showing following error in log:
com.pentaho.analyzer.service.e: Unable to find catalog: Sample
at com.pentaho.analyzer.service.impl.OlapConnectionManagerImpl.createConnection(SourceFile:79)
at com.pentaho.analyzer.service.impl.c.getConnection(SourceFile:31)
at com.pentaho.analyzer.service.impl.OlapMetaDataManager.getConnection(SourceFile:49)
Note: Well i have also checked the entry of corresponding catalog tag in datasource.xml under olap folder..
so i my question is what else i need to configure inorder to make analyzer functional?
I have repeated the same exercise.. now its working.. i simply refreshed pentaho.. may be earlier i forgot to refresh pentaho.

SSAS dimension source table changed - how to propagate changes to analysis server?

Sorry if the question isn't phrased very well but I'm new to SSAS and don't know the correct terms.
I have changed the name of a table and its columns. I am using said table as a dimension for my cube, so now the cube won't process. Presumably I need to make updates in the analysis server to reflect changes to the source database?
I have no idea where to start - any help gratefully received.
Thanks
Phil
Before going into the details of how to amend the cube, have you considered creating a view with the same name as the old table which maps the new column names to the old?
The cube processing process should pick this up transparently.
EDIT
There are quite a lot of variations on how to amend SSAS - it depends on your local set-up.
If your cube definition is held in source control (which it should ideally be), you need to check the cube definition out and amend it from there.
If your definition exists only on the server you need to open it from the server:
Open the Business Intelligence
Development Studio (BIDS) -
typically on the Windows start menu
under Programs > Microsoft SQL
Server 2005.
Go to File > Open > Analysis Services Database
Select your server/database and click OK.
Once you have the project open in BIDS, you can amend the Data Source View to switch to the new table.
These instructions are based on the principle that it's going to be easier to alias the new table to look like the old in the DSV, since this means fewer changes within the cube definition.
Open the Data Source View from the Solution Explorer - there should be only one.
Locate the table you need to change in the DSV
Right-click on the table and select Replace Table > With New Named Query
Replace the existing query with a query from the new table with the new columns aliased with the new names:
SELECT ~new column name~ AS ~old column name~
FROM ~new_table~
Once the new query has been set, deploy the changes:
If you use source control, check in and deploy the project to the target server.
If you opened the cube definition from the server, select File > Save All
Finally, re-process the cube.