All posts by Senthilraj

About Senthilraj

DW BI Architect and BI Project Management (Specialized in MicroStrategy). Hobbies/Passion about photography, tennis, music, travel-trekking. Website: www.b-diamonds.com www.facebook.com/SENRAJ81 www.linkedin.com/in/senraj

Intelligent Cube : Incremental Cube Refresh

Data Refresh Options:

  1. Full Refresh: Same as in 9.0.1. Whole report will be refreshed
  2. Dynamic Refresh:  Data will be refreshed based on the filter on Cube

Example:

  • let’s say cube filter has ‘Today minus 5 days’
  • Assume cube published on 18th of September
  • So the Cube will hold data from Sept-13th to Sept-18
  • What happens when cube refreshed on Sept-20th (Now the cube should hold data from Sept -16th to Sept-20th)
  • When the cube refreshed, it generates filter condition as follows;

Incremental Data fetch Condition

(a11.DAY_DT between DATE '2011-09-15' and DATE '2011-09-20'  and (not a11.DAY_DT between DATE '2011-09-13' and DATE '2011-09-18'))

So the report fetches data for only two days

Later part of the Cube SQL, it deletes the old data which not required for the ‘Between Today minus 5 days as Sept-20th

Data Deletion Condition:

([Day]@[DAY_DT] between 2011-09-13 00:00:00.000 and 2011-09-18 00:00:00.000

 and [Day]@[DAY_DT] not between 2011-09-15 00:00:00.000 and 2011-09-20 00:00:00.000)

  • Update Option: Inserts new data and deletes overlapping rows between old and new

If any history gets updated then that can be also updated

  • Insert Option: Just inserts the data in the cube memory

SQL pattern for Dynamic Refresh option when cube published for second time (recursive);

SQLStatements:Pass0 –    Execution Duration: 0:00:01.50

                Data Fetch Duration from Datasource(s):            0:00:00.01

                Total Data Fetch Duration:   0:00:00.03

Other Processing Duration:      0:00:00.03

Rows selected: 343

select     a11.day_ID, Col1, Col2, Sum(Col3)

from

X a11 Join Y a12 on (a11.ID=a12.ID)

where     a11.ID2 in (a,b,c,d)

and        (a11.DAY_DT between DATE ‘2011-09-15’ and DATE ‘2011-09-20’

 and (not a11.DAY_DT between DATE ‘2011-09-13’ and DATE ‘2011-09-18’))

group by                1,2,3

Pass1 –    Execution Duration: 0:00:00.00

Data Fetch Duration from Datasource(s):            0:00:00.00

Total Data Fetch Duration:   0:00:00.00

Other Processing Duration:      0:00:00.01

[Populate Report Data]

Pass2 –    Execution Duration: 0:00:00.00

Data Fetch Duration from Datasource(s):            0:00:00.00

Total Data Fetch Duration:   0:00:00.00

Other Processing Duration:      0:00:00.03

Delete from CUBE               Incremental Test 1

where     ([Day]@[DAY_DT] between 2011-09-13 00:00:00.000 and 2011-09-18 00:00:00.000

 and [Day]@[DAY_DT] not between 2011-09-15 00:00:00.000 and 2011-09-20 00:00:00.000)

Pass3 –    Execution Duration: 0:00:00.00

Data Fetch Duration from Datasource(s):            0:00:00.00

Total Data Fetch Duration:   0:00:00.00

Other Processing Duration:      0:00:00.00

[Refresh target cube ([Incremental Test 1]; [GUID] data)

Rows inserted:         343

Rows deleted:         688

Rows updated:        0

]

What is ‘Define Incremental Refresh Report Option’ (right click on Cube)

 Filter Option:

Let’s say, the cube hold data for 4 weeks of data for countries Canada and USA. Now I want to include a Germany alone for the same 4 weeks. Then instead of modifying the original cube…we can make use of ‘Incremental Refresh Report Options’

  • Right click on Cube à select ‘define incremental refresh report options’
  • Add Germany to the filter
  • Save that as ‘Incremental Refresh’

Note:

  • The filter should use the any one of the attribute present in the Cube
  • Once incremental refresh is created, Cube should not refreshed only Incremental refresh can be scheduled
  • Any number of Incremental refresh can be created against one cube

Report Option: (Haven’t tried much on this option yet)

From MSTR :  This option allows you to define a report that is used for the incremental refresh. When the incremental refresh is executed, the results of the report are compared to the data that is already in the cube, and is updated based on the option you choose in the Incremental Refresh Options, General tab). It must include all the attributes and metrics that are present in the Intelligent Cube. The Report should have at least one metric from the cube.

Dynamic Sourcing:

If a normal grid holds same or few objects of an Cube, then dynamically I-Server determines that report has to hit the DB or Cube memory. Since in this example, grid holds few or same number of objects as in CUBE, the I-Server makes this report to hit Cube

PS:Thanks to my colleague who also helped me in my busy schedule to collect few good points on this topic.

MicroStrategy Integration with Google Maps (Custom Visualizations)

Recently i tried the google maps integration with report/document and here are my inputs and some defintions with the help of MicroStrategy :)

Main Features :

  • Google Maps can viewed as regular maps
  • Threshold can be used
  • you can select single or multiple locations in the map and that can be used as filter

Prerequisites :

  • Need to get a license from Google (Google Maps API)
  • Configure the license with MicroStrategy WEB
  • Login to MSTR WEb –> Preferences –> Project Defaults –> General –> under Custom Visualizations –> Enable Custom Visualizations Editor

Configuration:

.Net Environment (Yet to try in J2EE)

To deploy the Map visualization plug-in to your MicroStrategy Web installation  and configure it, do the following:

  1. Navigate to GISConnectors in the MicroStrategy installation directory and open the folder that contains the Map visualization plug-in for your operating environment.

Open the ConnectorForGoogleMap_ASP  folder.

  1. From within the folder you just opened, copy the child ConnectorForGoogleMap folder to the plugins folder inside your MicroStrategy Web installation directory.
  2. Within the ConnectorForGoogleMap plug-in folder, navigate to WEB-INF/xml/config/google. Open the googleConfig.xml file
  3. Once you get the license key, paste the key in between <mk> and </mk>
  4. Add your API key between the <mk> and </mk> tags, in place of InvalidPremierKey shown in bold in the code sample below.– <gc>   <mk isPremier=true>InvalidPremierKey</mk>
  5. Restart your web server.
  6. Run the report
  7. Tools Menu –> Custom Visualizations –> Custom Visualizations Editor
  8. Enable this report to use Custom visualizations
  9. select AJAX — MAP (move to the right side)
  10. Enable –> Set view mode to custom visualizations and click ‘Visualizations Properties’
  11. In the editor;
    Select Locations –> Use attribute or form – Use attribute
    Select Locations –> Select data type – Latitude/Longtitude
    Select Locations –> Select Latitude – Store Latitude
    Select Location –> Select Longtitude – Store Longtitude form
  12. Click OK and Click OK on ‘Custom Visualizations’ editor
  13. Save the report

Intelligent Cube – Part-1

Intelligent Cubes: An Intelligent Cube is a set of data that can be shared as a single in-memory copy, among many different reports created by multiple users. Rather than returning data from the data warehouse for a single report,
you can return sets of data from your data warehouse and save them directly to Intelligence Server memory. The reports accessing Intelligent Cubes can use all of the OLAP Services features for analysis and reporting purposes.

Intelligent Cubes are created and published for use as a shared data source for the users to build reports from. Intelligent Cubes provide the fast response time and analytic calculations that are often associated with Multidimensional Online Analytic Processing (MOLAP) cubes, while also benefiting from the ability to use Relational Online Analytic Processing (ROLAP) by drilling into the full set of data outside of the Intelligent Cube. In addition, Intelligent Cubes are fully scalable, limiting excessive data consumption and redundant data by allowing you to build only the sets of data you require.
An intelligent cube is made up of two files – an info file (contains the structure of the cube) and a data file. Each one of them has a representation in memory and indicates different things:

  1. When the data file is not  updated with its representation from memory, the cube’s “dirty status flag”  is set to true.
  2. When the info file is different from its representation in memory, then the cube’s “monitoring information dirty status flag” is set to true.

While (1) indicates that the data of the cube is incorrect (2) indicates that the cube’s monitoring information is different on disk than it is in memory.

The following section discusses an example of the workflow and status change for MicroStrategy 9.x Intelligent Cube:
P = Processing, A = Active,  L = Loaded, D = Dirty, F = Filed, M = Monitoring Information Dirty

Coming soon on dynamic cube usage

MicroStrategy 9.2 is available

MicroStrategy 9.2 is available

Key Features

* Mobile – Ipad/Iphone

* Import/Migrate objects from any BI tool

* Google Map in Dashboard

* Encrypted inputs in Command Manager

* Incremental load in IntelligentCube

I’m Studying and working on POC/Demo on each features….will upload one by one soon…..if any one doing the same, email me….lets share the knowledge

how to change the group by in the SQL

In some cases, ordering/changing the group by will make alot difference in terms of performance; DB like DB2, Redbrick, Sybase are good examples for this.

we had a requirement in DB2, where Db2 asked us to change the group by order to make the SQL works better.

Solution:

  • In the project configuration (project level) –> Report Definition –> SQL Generation –> attribute weights –> <add the attributes in order the way you like to force it in the select clause so that group by will change automatically>
  • By combining “Attribute Weights” and the “Max Columns in Index” settings, a user can designate any attribute to be included in the index.