Created
May 26, 2017 20:13
-
-
Save dankor/bd8b944820a902e3f90a12231cb95a64 to your computer and use it in GitHub Desktop.
pythonet cube processing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import CLR | |
from CLR.System.Reflection import Assembly | |
Assembly.LoadWithPartialName("AnalysisServices.DLL") | |
from CLR.Microsoft.AnalysisServices import Server | |
from CLR.Microsoft.AnalysisServices import ProcessType | |
serverName = 'localhost\sql2005' | |
dbName = 'MyDatabase' | |
# Connect to server | |
amoServer = Server() | |
amoServer.Connect(serverName) | |
# Connect to database | |
amoDb = amoServer.Databases[dbName] | |
amoDb.Process(ProcessType.ProcessFull) |
Hi thanks for your reply. But still doesn’t work. I have tried lower and upper case. It doesn’t recognize the modules.
Saaket Varma
… On May 16, 2020, at 6:19 AM, Danylo Korostil ***@***.***> wrote:
@dankor commented on this gist.
LOL, the character case matters in python: you have installed and imported clr. It has nothing to do with pythonnet.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
I just tried my code and found out that it is deprecated already for a while. Instead, you have to use something like the following:
import clr
clr.AddReference('AnalysisServices')
However, I'm not interested to keep digging it out. See the updated documentation for more details.
Ok, thx, just to let you know, your above code also does not work. Will check the the documentation.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
LOL, the character case matters in python: you have installed and imported clr. It has nothing to do with pythonnet.