EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB15979: How to maintain a datamart report’s column order in the resulting database datamart table in MicroStrategy 9.x


Stefan Zepeda

Salesforce Solutions Architect • Strategy


How to maintain a datamart report’s column order in the resulting database datamart table in MicroStrategy 9.x

SYMPTOM:
The column order represented in a datamart's template is not passed on to the physical table structure in the database datamart table in Strategy 9.x.
 
Consider a report created with three attributes and three metrics, as illustrated below:
 

ka02R000000kcbJQAQ_0EM440000002FCv.jpeg

 
This report should be configured to run as a datamart report, as described in the following Strategy Knowledge Base technical note:
 
KB5395 (KB5200-071-0082): How to create and use Datamarts in Strategy Intelligence Server 7.x and 8.x
 
When viewing the SQL for this report, notice how the CREATE TABLE statement defines the column order. The report's column order was Customer Region, Customer State, Customer Country, Revenue, Profit, and Sales Rank. The CREATE TABLE statement has arranged the column order as Customer Country, Customer Region, Customer State, Revenue, Profit, and Sales Rank, as illustrated below:
 

ka02R000000kcbJQAQ_0EM440000002FCl.jpeg

 
CAUSE:
Strategy Developer 9.x rearranges the attribute column order. By default it sorts the attributes according to attribute weight, as described in the following Strategy Knowledge Base technical note:
 
KB8983 (KB4100-72X-0186): What is the “Attribute weights” setting in Strategy Desktop 8.x?
 
This setting can be verified/modified in the report VLDB properties window, as shown below:
 

ka02R000000kcbJQAQ_0EM440000002FCt.jpeg

 
ACTION:
The user can force the SQL to keep the report template's column order in the database's table structure by selecting 'Columns created in order in which they appear on the template' option from the report's VLDB settings, as illustrated below:
 

ka02R000000kcbJQAQ_0EM440000002FCf.jpeg

 
After the 'Columns created in order in which they appear on the template' option is selected, the SQL generated for the template changes to match the report's column order. The attributes/metrics will be added in the same order they appeared on the template, as illustrated below:
 

ka02R000000kcbJQAQ_0EM440000002FCj.jpeg

 
NOTE: This VLDB property can be found either in a specific report or in a database instance. If the 'Datamart column order' property is modified in the database instance level, all datamart reports that are run with that database instance will carry this behavior unless specified locally.
 


Comment

0 comments

Details

Knowledge Article

Published:

April 11, 2017

Last Updated:

April 11, 2017