none
MDX - FROM SYSTEMRESTRICTSCHEMA() possible to include placeholder/static row?

    Question

  • Hi all,

    I'm setting up dynamic partitioning and im looking at using the following MDX query in an oledb sql task (using AS oledb driver)

    SELECT True AS PartitionExists
      FROM SYSTEMRESTRICTSCHEMA (
      $SYSTEM.DISCOVER_PARTITION_STAT
    , CUBE_NAME = 'Partition Test'
    , MEASURE_GROUP_NAME = 'Fact Internet Sales'
    , PARTITION_NAME = 'Fact Internet Sales 200510'
    , DATABASE_NAME='Partition Test'
    )

    The query runs fine and all is good if the partition exists. But it returns an empty resultset if the partition doesn't exist. this causes SSIS to have a fit.

    Is there any mdx that'll change the 'true' to a 'false' if the discover_partition_stat call doesn't return anything?


    Jakub @ Adelaide, Australia

    Wednesday, November 13, 2013 4:49 AM

Answers

  • Hi jakubk,

    The "DISCOVER_PARTITION_STAT" Rowset return statistics on aggregations in a particular partition, it will return "None" if the partition doesn't exist. Currently, it seems we can't handle this via MDX query.

    Regards,


    Elvis Long
    TechNet Community Support

    Wednesday, November 20, 2013 9:37 AM
    Moderator

All replies