Search code examples
microstrategy

Command Manager Create Fact Script not seeing table


I keep getting a message when I try to run the script below in command manager, that the table isn't in the folder. However when I look in the folder the table is right there, with "logical table" in the details column. Can anyone see what the issue is with my script?

Code:

CREATE FACT "TestFact" IN FOLDER "\Schema Objects\Facts\BulkFactTest" EXPRESSION "StuffCount" EXPSOURCETABLES "\SCHEMA OBJECTS\TABLES\TableName" FOR PROJECT "ProjectName";

Solution

  • Just checked and it seems you have to omit the base path to the table. Check the outline-example for "Create Fact" of the CommandManager (always helpful).

    So this will work:

    CREATE FACT "TestFact" IN FOLDER "\Schema Objects\Facts\BulkFactTest" EXPRESSION "StuffCount" EXPSOURCETABLES "TableName" FOR PROJECT "ProjectName";
    

    Note: even when moving tables/table-aliases to subfolders you have to only provide the table-name in EXPSOURCETABLES. Sadly documentation is not the strong suit of MSTR.