MicroStrategy ONE

Add Warehouse Table statement

Adds a warehouse table from the warehouse to a project.

Copy
ADD WHTABLE 
 "warehouse_table_name"[PREFIX "prefix_name"] 
 [AUTOMAPPING (TRUE | FALSE)] [CALTABLELOGICALSIZE (TRUE | FALSE)] [COLMERGEOPTION 
 (RECENT | MAXDENOMINATOR | NOMERGE)] IN PROJECT "project_name";

where:

  • WHTABLE "warehouse_table_name" is the name of the warehouse table to be added to the project, of type string.

  • PREFIX "prefix_name" is the default prefix, of type string.

  • AUTOMAPPING indicates whether to read the latest information for Partition Mapping Tables from the warehouse when adding this table.

  • CALTABLELOGICALSIZE indicates whether to calculate the logical size of the table.

  • COLMERGEOPTION indicates how to handle identical columns of different data types:

    • RECENT uses the most recent column definition.

    • MAXDENOMINATOR uses the column definition with the largest precision or scale

    • NOMERGE renames the column in the newly added table, allowing the two columns to have different data types.

  • PROJECT "project_name" is the name of the project, of type string.

  • This statement can only be executed in a Windows environment.

  • When adding a new warehouse table into a project, make sure this project has at least one associated DBRole.

  • When you add a warehouse table:

    • Prefix option is similar to that of setting a default prefix in warehouse catalog. If Prefix exists, Command Manager uses it; otherwise, Command Manager creates a new one.

    • Automapping option: If

    • CalTableLogicalSize: Allows users to calculate the logical size of this table once facts and attributes have been mapped.

    • Default Options: AUTOMAPPING is set to TRUE, CALTABLELOGICALSIZE is set to TRUE, and COLMERGEOPTION is set to RECENT.

    • ColMergeOption:

      • RECENT: If a column is discovered in the warehouse, which has the same name as that of an existing column but different data types, the column in the project is updated to have the data type found in the warehouse.

      • MAXDENOMINATOR: Columns with the same name are always treated as the same object if they have compatible data types (that is, all numeric, all string-text, etc.). The resulting column in the project has a maximum common data type for all the corresponding physical columns.

      • NOMERGE: Two columns having the same name but different data types are treated as two different columns in the project.

Example

Copy
ADD WHTABLE "DT_QUARTER" PREFIX "Tutorial" 
 AUTOMAPPING TRUE CALTABLELOGICALSIZE TRUE COLMERGEOPTION MAXDENOMINATOR 
 IN PROJECT "MicroStrategy Tutorial";