Posts

Showing posts from April, 2019

SSAS - Retrieve multidimensional database objects directories

Problem: I am trying to list all objects (Cube, dimension, partition, ...) found in a SSAS server. I am able to do that using the following project: GitHub - SSASAMODB I am trying to retrieve the relevant directory (within the data directory) for each object. I am unable to do that since files names contains some Incremental number that change each time you made changes to the objects in the database. Example: Cube name: TestCube Folder: | Data Dir | \<SSASDB > \TestCube . 0.cub After changing and reprocessing the Cube it changes to another value | Data Dir | \<SSASDB > \TestCube . 1.5 . cub Is there is a property in AMO classes that returns the Folder Path of each object? What is the value of the Incremental number included in the Folder name? Is there some workaround to do that? Since i only have SQL Server Data Tools Business Intelligence tools installed i need a solution compatible with  SSIS script Task  since it is the only way that i can proces

SSIS - OLE DB Source DateAdd() with parameters strange behavior

Image
Problem: I want to load data from the last n days from a data source. To do this, I have a project parameter "number_of_days". I use the parameter in an OleDB data source with a SQL Command, with a clause WHERE StartDate >= CAST ( GETDATE () -? as date ) This parameter is mapped to a project parameter, an Int32. But, if I want to load the last 10 days, it is only giving me the last 8 days. Version info: SQL Server Data Tools 15.1.61710.120 Server is SQL Server 2017 standard edition. I set up a test package, with as little data as possible. There is this data source: Parameter: Parameter mapping: The T-SQL expression (wrong result): CAST ( GETDATE () -? as date ) The SSIS expression for date_calc (correct result): ( DT_DBTIMESTAMP ) ( DT_DBDATE ) DATEADD ( "DD" , - @[$ Project :: number_of_days ] , GETDATE ()) I would think that the T-SQL expression and the SSIS expression give the same result (today minus 10 days) b