Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
293 views
in Technique[技术] by (71.8m points)

SSIS script task doesnt populating data for SSAS tabular model properties

I am using ssis script task to get ssas property information like database name, database id, last processed date,last schema update and status .we have migrated from 2012 to 2016 server after that my package is running fine but it is populating only database name to destination table rest is null ,due to this i am facing lot of issues and for multi dimensional cubes data are fine ..only issue with tabular model... Please help me... appreciate your help..

question from:https://stackoverflow.com/questions/65943478/ssis-script-task-doesnt-populating-data-for-ssas-tabular-model-properties

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The link you have referenced is for the Multi-dimension model. For Tabular Model, you need to use the: Tabular Object Model

This means that your C# script task has to change. The following is an outline code for getting details of a Tabular Model:

private static void GetCubeDetails()
    {
        //Server
        var server = new Microsoft.AnalysisServices.Tabular.Server();
        server.Connect(CubeConnectionStringDest);

        LogUtil.Log(server.LastSchemaUpdate.ToString());

        //Database
        var db = server.Databases.FindByName(DatabaseNameDest);
        LogUtil.Log(db.LastProcessed.ToString());

        //Model
        var model = db.Model;
        
        //table
        foreach(var table in model.Tables)
        {
            LogUtil.Log(table.ModifiedTime.ToString());

            //partitions
            foreach(var partition in table.Partitions)
            {
                LogUtil.Log(partition.State.ToString());
                LogUtil.Log(partition.RefreshedTime.ToString());
            }
        }


    }

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...