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

KB305027: In MicroStrategy Secure Enterprise 10.x, how to alter the columns in the file created by Bulk Export Execution?


Community Admin

• Strategy


SYMPTOM
Even when users choose to show the DESC form of the attribute in a Strategy report, both the ID and DESC forms will be exported by default when performing a Bulk Export execution as shown below.

ka04W000001482xQAA_0EM4400000029BG.jpeg

In some business scenarios, users may wish to manipulate the outcome of Bulk Export execution and display only the DESC form just like the report. This technical document provides the necessary steps to achieve this requirement.
 
BULK EXPORT EXECUTION PROCESSING
As KB31266 explains, it is important to know that when the Bulk Export report is executed, Strategy Intelligence Server creates a temporary table in the Project's Data Warehouse. Strategy Intelligence Server then incrementally fetches results from that table, and the naming convention for these temporary tables is of the form:
<Prefix><UserName>_<JobID>_<Time at which temp table is created>
 
STEPS TO MANIPULATE THE BULK EXPORT OUTPUT

  1. Open the SQL Statements tab in the Bulk Export Configuration. In this page, the user can write SQL queries to manipulate the result.

    

ka04W000001482xQAA_0EM4400000029BI.jpeg

 

  1. In this page, wildcards listed in KB10940 can be used. Since the temporary table is being modified here, the wildcard “???” can be used to specify the dynamically named temporary table in an ALTER statement to drop the ID form as follows.

   

ka04W000001482xQAA_0EM4400000029BU.jpeg

 

  1. After defining the query and executing the Bulk Export, following queries will be submitted. Notice that the ALTER query is now in place. 


     ===========================================
     drop table Administrato_378_150925
     ----------------------
     select a11.att_BulkExp_ID att_BulkExp_ID,
            max(a12.att_BulkExp_Desc) att_BulkExp_Desc,
            sum(a11.revenue_BulkExp) WJXBFS1
     into Administrato_378_150925
     from BulkExp_Fact a11
      join BulkExp_LU a12
      on (a11.att_BulkExp_ID = a12.att_BulkExp_ID)
     group by a11.att_BulkExp_ID 
     ----------------------
     ALTER TABLE Administrato_378_150925
     DROP COLUMN att_BulkExp_ID
     ----------------------
     select * from Administrato_378_150925
     ----------------------
     drop table Administrato_378_150925
     =========================================== 

  1. The exported text file does not have the ID column as it has been dropped from the temporary table.

   

ka04W000001482xQAA_0EM4400000029BR.jpeg

Comment

0 comments

Details

Knowledge Article

Published:

June 5, 2017

Last Updated:

June 5, 2017