A client wanted to upgrade their SSAS model to SSAS 2016 to take advantage of some of the features of the new level 1200 compatibility model. But they weren’t yet ready to upgrade their SSIS server from SQL 2014. This presented a problem because they had been using the Analysis Services Processing Task to process their tabular model nightly. This processing task in SSIS 2014 uses the old Analysis Management Objects, which aren’t compatible with the new SSAS tabular models.
Attempting to use the AS Processing Task results in the following error: “[Analysis Services Execute DDL Task] Error: This command cannot be executed on database ‘MySSASDB’ because it has been defined with StorageEngineUsed set to TabularMetadata. For databases in this mode, you must use Tabular APIs to administer the database”
The reason for keeping SSAS processing in an SSIS package was because it kept consistent logging throughout their data refresh process. So we set out to find another solution.
The new SSAS Tabular models use Tabular Model Scripting Language (JSON) rather than XMLA. A simple process full command in TMSL might look like:
{ "refresh": { "type": "full", "objects": [ { "database": "MySSASDB" } ] } }
Just pasting the JSON to process the model into an Analysis Services Execute DDL Task didn’t work. It returned the error “DDL is not valid”.
I asked around and received a couple of solutions that worked.
Option 1 (my less preferred option): Create an OLEDB connection manager (rather than MSOLAP) and use an Execute SQL Task.
You can set up an OLE DB connection that looks like the below. Create a new connection manager and choose the OLE DB connection manager type. Change the provider to Microsoft OLE DB Provider for Analysis Service 13.0 and fill in your connection information.
You’ll see the connection manager show up in the Connection Managers pane looking like this:
Drag in an Execute SQL task, use the previously defined connection manager and paste in the JSON. This works just fine, but feels a bit too much like a workaround rather than a solid solution to me.
Option #2: Use an Analysis Services Execute DDL task and wrap the JSON in XMLA
Drag in an Analysis Services Execute DDL task. Create a new connection manager by choosing New Analysis Services Connection.
Edit your connection information, click OK, and you will end up with a connection manager that looks like this:
Use that connection manager in the AS Execute DDL task. We can use the same JSON from earlier and wrap it in XMLA as shown below.
<Statement xmlns="urn:schemas-microsoft-com:xml-analysis"> { "refresh": { "type": "full", "objects": [ { "database": "MySSASDB" } ] } } </Statement>
The XMLA/JSON command can be a direct source statement or placed in a variable and referenced from the task.
To test that the model is successfully processed, you can execute the SSIS task or package and then run the following query against the DMV.
Select [catalog_name], [date_modified], [compatibility_level] from $SYSTEM.DBSCHEMA_CATALOGS where [Catalog_Name] = 'MySSASDB'
So if you are caught between versions in SSIS and SSAS, do not despair. You can still process your new SSAS Tabular model from an SSIS package.
Saved my bacon today.
Glad it helped! Thanks for the comment.
Thank you for this tip – solved a very vexing issue.
Thank you.
Option 2 is a winner!!! Thank you.
Option 1 worked perfectly
Option 2 did process the model successfully, but SSIS task errored out with
“Error: 0x0 at Option 2 – XMLA, Analysis Services Execute DDL Task: The server sent an unrecognizable response.”
Using SSDT 14.0.61021.0 (October 2016)/SSIS from within Visual Studio designer/SSAS 2016 13.0.4001.0 (SP1)
Any insight would be appreciated as I would like to use the Analysis Services task preferably over the TSQL task.
thanks.
I have the same situation. I just wonder why the execute T-SQL task works, we arent using any of the json commands available in sql server. Does it automatically wrap the json in XMLA, and then act similar to the XMLA query? How could I see what is actually happening? I tried viewing the XML of the package but that didn’t show anything useful.
Thanks this is working fine with Analysis Services Execute
what if I want to process all databases in the server