예제 #1
0
        public void CreateStarSchemaExtractTemplate(
            [Parameter("The name to give to the template")]
            string templateName,
            [Parameter("The name of the DSN that contains the connection details for the " +
                       "database where the star schema extract is to be created. This DSN " +
                       "must exist on the HFM server, and have been registered via the " +
                       "HFM Configuration utility.")]
            string DSN,
            [Parameter("The prefix that should appear at the start of each table name created " +
                       "by the extract process.")]
            string tablePrefix,
            [Parameter("Whether to delete any existing data before performing the extract",
                       DefaultValue = true)]
            bool deleteExisting,
            [Parameter("The type of star schema to produce.")]
            EStarSchemaExtractType extractType,
            [Parameter("Whether to include dynamic accounts",
                       DefaultValue = false)]
            bool includeDynamicAccounts,
            [Parameter("Whether to include calculated data",
                       DefaultValue = true)]
            bool includeCalculatedData,
            [Parameter("Whether to include derived data",
                       DefaultValue = true)]
            bool includeDerivedData,
            ExtractSpecification slice)
        {
            // TODO: Complete this
            StringBuilder sb = new StringBuilder();

            sb.Append("<povTemplate><povEA>");
            sb.Append(slice);
            sb.Append("</povEA><options><tablePrefix>");
            //sb.Append(spec.TablePrefix);
            sb.Append("</tablePrefix><exportOption>");
            //sb.Append((int)spec.ExtractType);
            sb.Append("</exportOption><selectedDSN>");
            //sb.Append(spec.DataSource);
            sb.Append("</selectedDSN><excludeDynAccts>");
            sb.Append(includeDynamicAccounts ? 0 : -1);
            sb.Append("</excludeDynAccts></options></povTemplate>");

            HFM.Try("Creating star schema template {0}", templateName,
                    () => HsvStarSchemaTemplates.SetTemplate(templateName, sb.ToString(), true));
        }
예제 #2
0
        public void ExtractDataToStarSchema(
            [Parameter("The name of the DSN that contains the connection details for the " +
                       "database where the star schema extract is to be created. This DSN " +
                       "must exist on the HFM server, and have been registered via the " +
                       "HFM Configuration utility.")]
            string DSN,
            [Parameter("The prefix that should appear at the start of each table name created " +
                       "by the extract process.")]
            string tablePrefix,
            [Parameter("Whether to delete any existing data before performing the extract",
                       DefaultValue = true)]
            bool deleteExisting,
            [Parameter("The type of star schema to produce.")]
            EStarSchemaExtractType extractType,
            [Parameter("Whether to include data",
                       DefaultValue = true, Since = "11.1.2.2.300")]
            bool includeData,
            [Parameter("Whether to include dynamic accounts",
                       DefaultValue = false)]
            bool includeDynamicAccounts,
            [Parameter("Whether to include calculated data",
                       DefaultValue = true, Since = "11.1.1")]
            bool includeCalculatedData,
            [Parameter("Whether to include derived data",
                       DefaultValue = true, Since = "11.1.1")]
            bool includeDerivedData,
            [Parameter("The path to where the EA extract log file should be generated; " +
                       "if omitted, no log file is created.", DefaultValue = null)]
            string logFile,
            ExtractSpecification slice,
            IOutput output)
        {
            DoEAExtract(DSN, tablePrefix, (SS_PUSH_OPTIONS)(deleteExisting ? EPushType.Create : EPushType.Update),
                        (EA_EXTRACT_TYPE_FLAGS)extractType, includeData, includeDynamicAccounts,
                        includeCalculatedData, includeDerivedData, false, false,
#if LATE_BIND || HFM_11_1_2_2
                        (EA_LINEITEM_OPTIONS)ELineItems.Summary,
#endif
                        "", logFile, slice, output);
        }