10 Replies Latest reply: Aug 17, 2016 10:17 AM by Gysbert Wassenaar RSS

    Data Model without Data

    Govind Ramchetty

      HI

      I have data load script.

      Is it possible to test only join and loops.

       

      I dont have database connection.Without data is it possible to test joins and loops.

      My script is

       

      [EXP_F_EXPENSE]:

      SELECT "RECORD_DATE_KEY" AS "DATE_KEY",

        "COMPANY_KEY",

        "ACFT_KEY",

        "AIRCRAFT_UNIT_KEY",

        "GL_ACCOUNT_KEY" AS "EXP_FACT_GL_ACCOUNT_KEY",

        "INV_KEY",

        "INV_LINE_ITEM_KEY",

        "FLEET_KEY",

        "LOCATION_KEY",

        "FACT_SK",

        "ORD_LINE_ITEM_KEY",

        "SERVICE_LOCATION",

        "SUPPLIER_LOCATION",

        "ORD_KEY",

        "SUP_ITEM_KEY",

        "ATA_KEY",

        "SUP_KEY",

        "EXP_CLASS_CD" AS "EXP_FACT_EXP_CLASS_CD",

        "EXP_DIVISION_CD" AS "EXP_FACT_EXP_DIVISION_CD",

        "EXP_COST_ROLLUP_CD" AS "EXP_FACT_EXP_COST_ROLLUP_CD",

        "EXP_COST_ACCOUNT_CD" AS "EXP_FACT_EXP_COST_ACCOUNT_CD",

        "EXP_COST_SUBCATEGORY_CD",

        "INVOICED_RATE",

        "INVOICED_QUANTITY",

        "INVOICE_LINE_TOTAL",

        "DISPUTED_AMOUNT",

        "CLAIM_LINE_ITEM_SUM",

        "DEBIT_LINE_ITEM_SUM",

        "CREDIT_LINE_ITEM_SUM",

        "ACTUAL_EXPENSE",

        "ACCRUAL_EXPENSE",

        "GRAND_TOTAL_EXPENSE",

        "ACCRUAL_IND",

        "DISTRIBUTED_DT",

        "APPROVED_DT"

      FROM "EXP_F_EXPENSE";

       

       

      [EXP_D_DATE]:

      SELECT "DATE_KEY",

        "DATE_KEY" AS "GL_DATE_KEY",

        "COMPANY_KEY" AS "COMPANY_KEY_DATE",

          "DATE_VALUE",

        "DAY_OF_WEEK_NBR",

        "DAY_OF_WEEK_DESC",

        "DAY_OF_WEEK_SHORT_DESC",

        "WEEK_END_FLG",

        "WEEK_IN_MONTH_NBR",

        "WEEK_IN_YEAR_NBR",

        "WEEK_START_DT",

        "WEEK_END_DT",

        "DAY_OF_MONTH_NBR",

        "MONTH_VALUE",

        "MONTH_DESC",

        "MONTH_SDESC",

        "MONTH_START_DT",

        "MONTH_END_DT",

        "DAYS_IN_MONTH_NBR",

        "LAST_DAY_OF_MONTH_FLG",

        "DAY_OF_QUARTER_NBR",

        "QUARTER_VALUE",

        "QUARTER_DESC",

        "QUARTER_START_DT",

        "QUARTER_END_DT",

        "YEAR_QRTR_VALUE",

        "ACC_QRTR_VALUE",

        "ACC_YEAR_MONTH_VALUE",

        "ACC_YEAR_VALUE",

        "LAST_DAY_OF_QUARTER_FLG",

        "DAY_OF_YEAR_NBR",

        "YEAR_VALUE",

        "YEAR_MONTH_VALUE",

        "PRIOR_YEAR_VALUE",

        "PRIOR_YEAR_QRTR_VALUE",

        "PRIOR_QRTR_VALUE",

        "FIRST_DAY_OF_MONTH_FLG",

        "FIRST_DAY_OF_WEEK_FLG",

        "FIRST_DAY_OF_QRTR_FLG",

        "FIRST_DAY_OF_YEAR_FLG"

      FROM "EXP_D_DATE";

       

       

       

       

      [EXP_D_INVOICE]:

      SELECT "INV_KEY",

        "INV_KEY" AS "GL_INV_KEY",

        "BATCH_KEY",

        "COMPANY_KEY" as "COMPANY_KEY_INVOICE",

        "SUPPLIER_KEY",

        "INV_SOURCE_NM",

        "SUPPLIER_INV_NBR",

        "INV_SUBJECT_AREA_DESC",

        "INV_TYPE_DESC",

        "INV_CREATE_DT",

        "INV_CREATED_BY_USERNM",

        "INV_DT",

        "INV_STATUS_CD",

        "INV_STATUS_NM",

        "INV_APPROVED_DT",

        "BATCH_TRANSFER_ID",

        "INV_LOCATION_KEY",

        "REMIT_TO_VENDOR_ID",

        "FR_GL_POSTED_DT",

        "GMP_COVERAGE_YRMO",

        "GMP_TRANS_YRMO"

      FROM "EXP_D_INVOICE";

       

       

      [EXP_F_GL]:

      SELECT "GL_KEY",

        "GL_ACCOUNT_KEY",

        "SUP_KEY" AS "GL_SUP_KEY",

        "INV_KEY" AS "GL_INV_KEY",

        "DATE_KEY" AS "GL_DATE_KEY",

        "ACFT_KEY" AS "GL_ACFT_KEY",

        "COMPANY_KEY" AS "GL_COMPANY_KEY",

        "FLEET_KEY" AS "GL_FLEET_KEY",

        "GL_ACCOUNT_NBR",

        "EXP_CLASS_CD",

        "EXP_DIVISION_CD",

        "EXP_COST_ROLLUP_CD",

        "EXP_COST_ACCOUNT_CD",

        "INV_NBR",

        "VENDOR_ID",

        "GL_ENTRY_DT",

        "GL_POSTED_DT",

        "INV_DT" AS "GL_INV_DT",

        "EXPENSED_AMOUNT",

        "CREDIT_AMOUNT"

      FROM "EXP_F_GL";

        • Re: Data Model without Data
          Gysbert Wassenaar


          EXP_F_EXPENSE]:
          LOAD 1 AS "DATE_KEY",
          1 as   "COMPANY_KEY",
          1 as   "ACFT_KEY",
          1 as   "AIRCRAFT_UNIT_KEY",
          1 as   "GL_ACCOUNT_KEY" AS "EXP_FACT_GL_ACCOUNT_KEY",
          1 as   "INV_KEY",
          1 as   "INV_LINE_ITEM_KEY",
          1 as   "FLEET_KEY",
          1 as   "LOCATION_KEY",
          1 as   "FACT_SK",
          1 as   "ORD_LINE_ITEM_KEY",
          1 as   "SERVICE_LOCATION",
          1 as   "SUPPLIER_LOCATION",
          1 as   "ORD_KEY",
          1 as   "SUP_ITEM_KEY",
          1 as   "ATA_KEY",
          1 as   "SUP_KEY",
          1 as   "EXP_CLASS_CD" AS "EXP_FACT_EXP_CLASS_CD",
          1 as   "EXP_DIVISION_CD" AS "EXP_FACT_EXP_DIVISION_CD",
          1 as   "EXP_COST_ROLLUP_CD" AS "EXP_FACT_EXP_COST_ROLLUP_CD",
          1 as   "EXP_COST_ACCOUNT_CD" AS "EXP_FACT_EXP_COST_ACCOUNT_CD",
          1 as   "EXP_COST_SUBCATEGORY_CD",
          1 as   "INVOICED_RATE",
          1 as   "INVOICED_QUANTITY",
          1 as   "INVOICE_LINE_TOTAL",
          1 as   "DISPUTED_AMOUNT",
          1 as   "CLAIM_LINE_ITEM_SUM",
          1 as   "DEBIT_LINE_ITEM_SUM",
          1 as   "CREDIT_LINE_ITEM_SUM",
          1 as   "ACTUAL_EXPENSE",
          1 as   "ACCRUAL_EXPENSE",
          1 as   "GRAND_TOTAL_EXPENSE",
          1 as   "ACCRUAL_IND",
          1 as   "DISTRIBUTED_DT",
          1 as   "APPROVED_DT"
          1 as FROM "EXP_F_EXPENSE";
          1 as [EXP_D_DATE]:
          1 as SELECT "DATE_KEY",
          1 as   "DATE_KEY" AS "GL_DATE_KEY",
          1 as   "COMPANY_KEY" AS "COMPANY_KEY_DATE",
          1 as     "DATE_VALUE",
          1 as   "DAY_OF_WEEK_NBR",
          1 as   "DAY_OF_WEEK_DESC",
          1 as   "DAY_OF_WEEK_SHORT_DESC",
          1 as   "WEEK_END_FLG",
          1 as   "WEEK_IN_MONTH_NBR",
          1 as   "WEEK_IN_YEAR_NBR",
          1 as   "WEEK_START_DT",
          1 as   "WEEK_END_DT",
          1 as   "DAY_OF_MONTH_NBR",
          1 as   "MONTH_VALUE",
          1 as   "MONTH_DESC",
          1 as   "MONTH_SDESC",
          1 as   "MONTH_START_DT",
          1 as   "MONTH_END_DT",
          1 as   "DAYS_IN_MONTH_NBR",
          1 as   "LAST_DAY_OF_MONTH_FLG",
          1 as   "DAY_OF_QUARTER_NBR",
          1 as   "QUARTER_VALUE",
          1 as   "QUARTER_DESC",
          1 as   "QUARTER_START_DT",
          1 as   "QUARTER_END_DT",
          1 as   "YEAR_QRTR_VALUE",
          1 as   "ACC_QRTR_VALUE",
          1 as   "ACC_YEAR_MONTH_VALUE",
          1 as   "ACC_YEAR_VALUE",
          1 as   "LAST_DAY_OF_QUARTER_FLG",
          1 as   "DAY_OF_YEAR_NBR",
          1 as   "YEAR_VALUE",
          1 as   "YEAR_MONTH_VALUE",
          1 as   "PRIOR_YEAR_VALUE",
          1 as   "PRIOR_YEAR_QRTR_VALUE",
          1 as   "PRIOR_QRTR_VALUE",
          1 as   "FIRST_DAY_OF_MONTH_FLG",
          1 as   "FIRST_DAY_OF_WEEK_FLG",
          1 as   "FIRST_DAY_OF_QRTR_FLG",
          1 as   "FIRST_DAY_OF_YEAR_FLG"
          AUTOGENERATE 0;

           

          [EXP_D_INVOICE]:
          LOAD
          1 as "INV_KEY",
          1 as   "INV_KEY" AS "GL_INV_KEY",
          1 as   "BATCH_KEY",
          1 as   "COMPANY_KEY" as "COMPANY_KEY_INVOICE",
          1 as   "SUPPLIER_KEY",
          1 as   "INV_SOURCE_NM",
          1 as   "SUPPLIER_INV_NBR",
          1 as   "INV_SUBJECT_AREA_DESC",
          1 as   "INV_TYPE_DESC",
          1 as   "INV_CREATE_DT",
          1 as   "INV_CREATED_BY_USERNM",
          1 as   "INV_DT",
          1 as   "INV_STATUS_CD",
          1 as   "INV_STATUS_NM",
          1 as   "INV_APPROVED_DT",
          1 as   "BATCH_TRANSFER_ID",
          1 as   "INV_LOCATION_KEY",
          1 as   "REMIT_TO_VENDOR_ID",
          1 as   "FR_GL_POSTED_DT",
          1 as   "GMP_COVERAGE_YRMO",
          1 as   "GMP_TRANS_YRMO"
          AUTOGENERATE 0;

           

          [EXP_F_GL]:
          LOAD
          1 as  "GL_KEY",
          1 as   "GL_ACCOUNT_KEY",
          1 as   "SUP_KEY" AS "GL_SUP_KEY",
          1 as   "INV_KEY" AS "GL_INV_KEY",
          1 as   "DATE_KEY" AS "GL_DATE_KEY",
          1 as   "ACFT_KEY" AS "GL_ACFT_KEY",
          1 as   "COMPANY_KEY" AS "GL_COMPANY_KEY",
          1 as   "FLEET_KEY" AS "GL_FLEET_KEY",
          1 as   "GL_ACCOUNT_NBR",
          1 as   "EXP_CLASS_CD",
          1 as   "EXP_DIVISION_CD",
          1 as   "EXP_COST_ROLLUP_CD",
          1 as   "EXP_COST_ACCOUNT_CD",
          1 as   "INV_NBR",
          1 as   "VENDOR_ID",
          1 as   "GL_ENTRY_DT",
          1 as   "GL_POSTED_DT",
          1 as   "INV_DT" AS "GL_INV_DT",
          1 as   "EXPENSED_AMOUNT",
          1 as   "CREDIT_AMOUNT"
          AUTOGENERATE 0

          ;

            • Re: Data Model without Data
              Govind Ramchetty

              Thanks a lot

              I have 2 fact tables and 2 Dim tables.

               

              I joined

               

              Dim1.Date_key=Fact1.Date_Key

              Dim1.Inv_key=Fact1.Inv_Key

              and

              Dim2.Date_key=Fact2.Date_Key

              Dim2.Inv_key=Fact2.Inv_Key

               

              I am getting loop error.How can i fix.

               

              My Original query is

              [EXP_F_EXPENSE]:

              SELECT "RECORD_DATE_KEY" AS "DATE_KEY",

                "COMPANY_KEY",

                "ACFT_KEY",

                "AIRCRAFT_UNIT_KEY",

                "GL_ACCOUNT_KEY" AS "EXP_FACT_GL_ACCOUNT_KEY",

                "INV_KEY",

                "INV_LINE_ITEM_KEY",

                "FLEET_KEY",

                "LOCATION_KEY",

                "FACT_SK",

                "ORD_LINE_ITEM_KEY",

                "SERVICE_LOCATION",

                "SUPPLIER_LOCATION",

                "ORD_KEY",

                "SUP_ITEM_KEY",

                "ATA_KEY",

                "SUP_KEY",

                "EXP_CLASS_CD" AS "EXP_FACT_EXP_CLASS_CD",

                "EXP_DIVISION_CD" AS "EXP_FACT_EXP_DIVISION_CD",

                "EXP_COST_ROLLUP_CD" AS "EXP_FACT_EXP_COST_ROLLUP_CD",

                "EXP_COST_ACCOUNT_CD" AS "EXP_FACT_EXP_COST_ACCOUNT_CD",

                "EXP_COST_SUBCATEGORY_CD",

                "INVOICED_RATE",

                "INVOICED_QUANTITY",

                "INVOICE_LINE_TOTAL",

                "DISPUTED_AMOUNT",

                "CLAIM_LINE_ITEM_SUM",

                "DEBIT_LINE_ITEM_SUM",

                "CREDIT_LINE_ITEM_SUM",

                "ACTUAL_EXPENSE",

                "ACCRUAL_EXPENSE",

                "GRAND_TOTAL_EXPENSE",

                "ACCRUAL_IND",

                "DISTRIBUTED_DT",

                "APPROVED_DT"

              FROM "EXP_F_EXPENSE";

               

               

              [EXP_D_DATE]:

              SELECT "DATE_KEY",

                "DATE_KEY" AS "GL_DATE_KEY",

                "COMPANY_KEY" AS "COMPANY_KEY_DATE",

                  "DATE_VALUE",

                "DAY_OF_WEEK_NBR",

                "DAY_OF_WEEK_DESC",

                "DAY_OF_WEEK_SHORT_DESC",

                "WEEK_END_FLG",

                "WEEK_IN_MONTH_NBR",

                "WEEK_IN_YEAR_NBR",

                "WEEK_START_DT",

                "WEEK_END_DT",

                "DAY_OF_MONTH_NBR",

                "MONTH_VALUE",

                "MONTH_DESC",

                "MONTH_SDESC",

                "MONTH_START_DT",

                "MONTH_END_DT",

                "DAYS_IN_MONTH_NBR",

                "LAST_DAY_OF_MONTH_FLG",

                "DAY_OF_QUARTER_NBR",

                "QUARTER_VALUE",

                "QUARTER_DESC",

                "QUARTER_START_DT",

                "QUARTER_END_DT",

                "YEAR_QRTR_VALUE",

                "ACC_QRTR_VALUE",

                "ACC_YEAR_MONTH_VALUE",

                "ACC_YEAR_VALUE",

                "LAST_DAY_OF_QUARTER_FLG",

                "DAY_OF_YEAR_NBR",

                "YEAR_VALUE",

                "YEAR_MONTH_VALUE",

                "PRIOR_YEAR_VALUE",

                "PRIOR_YEAR_QRTR_VALUE",

                "PRIOR_QRTR_VALUE",

                "FIRST_DAY_OF_MONTH_FLG",

                "FIRST_DAY_OF_WEEK_FLG",

                "FIRST_DAY_OF_QRTR_FLG",

                "FIRST_DAY_OF_YEAR_FLG"

              FROM "EXP_D_DATE";

               

               

               

               

              [EXP_D_INVOICE]:

              SELECT "INV_KEY",

                "INV_KEY" AS "GL_INV_KEY",

                "BATCH_KEY",

                "COMPANY_KEY" as "COMPANY_KEY_INVOICE",

                "SUPPLIER_KEY",

                "INV_SOURCE_NM",

                "SUPPLIER_INV_NBR",

                "INV_SUBJECT_AREA_DESC",

                "INV_TYPE_DESC",

                "INV_CREATE_DT",

                "INV_CREATED_BY_USERNM",

                "INV_DT",

                "INV_STATUS_CD",

                "INV_STATUS_NM",

                "INV_APPROVED_DT",

                "BATCH_TRANSFER_ID",

                "INV_LOCATION_KEY",

                "REMIT_TO_VENDOR_ID",

                "FR_GL_POSTED_DT",

                "GMP_COVERAGE_YRMO",

                "GMP_TRANS_YRMO"

              FROM "EXP_D_INVOICE";

               

               

              [EXP_F_GL]:

              SELECT "GL_KEY",

                "GL_ACCOUNT_KEY",

                "SUP_KEY" AS "GL_SUP_KEY",

                "INV_KEY" AS "GL_INV_KEY",

                "DATE_KEY" AS "GL_DATE_KEY",

                "ACFT_KEY" AS "GL_ACFT_KEY",

                "COMPANY_KEY" AS "GL_COMPANY_KEY",

                "FLEET_KEY" AS "GL_FLEET_KEY",

                "GL_ACCOUNT_NBR",

                "EXP_CLASS_CD",

                "EXP_DIVISION_CD",

                "EXP_COST_ROLLUP_CD",

                "EXP_COST_ACCOUNT_CD",

                "INV_NBR",

                "VENDOR_ID",

                "GL_ENTRY_DT",

                "GL_POSTED_DT",

                "INV_DT" AS "GL_INV_DT",

                "EXPENSED_AMOUNT",

                "CREDIT_AMOUNT"

              FROM "EXP_F_GL";

               

              Can you please help how can i break loops

                • Re: Data Model without Data
                  Gysbert Wassenaar

                  rename fields so there is always only one path from any table to any other table.

                    • Re: Data Model without Data
                      Govind Ramchetty

                      I didnt get.Please explain.above script

                      • Re: Data Model without Data
                        Govind Ramchetty

                        Hi

                        Can you please find my Data Model.

                         

                        Please let me know.How can i break loops

                          • Re: Data Model without Data
                            Gysbert Wassenaar

                            Concatenate both fact tables into one table and rename GL_INV_KEY to INV_KEY and GL_DATE_KEY to DATE_KEY.

                              • Re: Data Model without Data
                                Govind Ramchetty

                                Can you please let me know how will concatenate.

                                If concatenate any data will loose ? can i gat all data ?

                                 

                                My 2 fact tables.

                                 

                                [EXP_F_EXPENSE]:

                                SELECT "RECORD_DATE_KEY" AS "DATE_KEY",

                                  "COMPANY_KEY",

                                  "ACFT_KEY",

                                  "AIRCRAFT_UNIT_KEY",

                                  "GL_ACCOUNT_KEY" AS "EXP_FACT_GL_ACCOUNT_KEY",

                                  "INV_KEY",

                                  "INV_LINE_ITEM_KEY",

                                  "FLEET_KEY",

                                  "LOCATION_KEY",

                                  "FACT_SK",

                                  "ORD_LINE_ITEM_KEY",

                                  "SERVICE_LOCATION",

                                  "SUPPLIER_LOCATION",

                                  "ORD_KEY",

                                  "SUP_ITEM_KEY",

                                  "ATA_KEY",

                                  "SUP_KEY",

                                  "EXP_CLASS_CD" AS "EXP_FACT_EXP_CLASS_CD",

                                  "EXP_DIVISION_CD" AS "EXP_FACT_EXP_DIVISION_CD",

                                  "EXP_COST_ROLLUP_CD" AS "EXP_FACT_EXP_COST_ROLLUP_CD",

                                  "EXP_COST_ACCOUNT_CD" AS "EXP_FACT_EXP_COST_ACCOUNT_CD",

                                  "EXP_COST_SUBCATEGORY_CD",

                                  "INVOICED_RATE",

                                  "INVOICED_QUANTITY",

                                  "INVOICE_LINE_TOTAL",

                                  "DISPUTED_AMOUNT",

                                  "CLAIM_LINE_ITEM_SUM",

                                  "DEBIT_LINE_ITEM_SUM",

                                  "CREDIT_LINE_ITEM_SUM",

                                  "ACTUAL_EXPENSE",

                                  "ACCRUAL_EXPENSE",

                                  "GRAND_TOTAL_EXPENSE",

                                  "ACCRUAL_IND",

                                  "DISTRIBUTED_DT",

                                  "APPROVED_DT"

                                FROM "EXP_F_EXPENSE";

                                 

                                 

                                 

                                 

                                [EXP_F_GL]:

                                SELECT "GL_KEY",

                                  "GL_ACCOUNT_KEY",

                                  "SUP_KEY" AS "GL_SUP_KEY",

                                  "INV_KEY" AS "GL_INV_KEY",

                                  "DATE_KEY" AS "GL_DATE_KEY",

                                  "ACFT_KEY" AS "GL_ACFT_KEY",

                                  "COMPANY_KEY" AS "GL_COMPANY_KEY",

                                  "FLEET_KEY" AS "GL_FLEET_KEY",

                                  "GL_ACCOUNT_NBR",

                                  "EXP_CLASS_CD",

                                  "EXP_DIVISION_CD",

                                  "EXP_COST_ROLLUP_CD",

                                  "EXP_COST_ACCOUNT_CD",

                                  "INV_NBR",

                                  "VENDOR_ID",

                                  "GL_ENTRY_DT",

                                  "GL_POSTED_DT",

                                  "INV_DT" AS "GL_INV_DT",

                                  "EXPENSED_AMOUNT",

                                  "CREDIT_AMOUNT"

                                FROM "EXP_F_GL";

                                 

                                Send me concatenate query...

                                • Re: Data Model without Data
                                  Govind Ramchetty

                                  HI

                                  I used below query in my data loader script.

                                   

                                  LIB CONNECT TO [EDWDEV1_REPORT1];

                                   

                                   

                                  [EXP_F_EXPENSE]:

                                  SELECT "RECORD_DATE_KEY" AS "DATE_KEY",

                                    "COMPANY_KEY",

                                    "ACFT_KEY",

                                    "AIRCRAFT_UNIT_KEY",

                                    "GL_ACCOUNT_KEY",

                                    "INV_KEY",

                                    "INV_LINE_ITEM_KEY",

                                    "FLEET_KEY",

                                    "LOCATION_KEY",

                                    "FACT_SK",

                                    "ORD_LINE_ITEM_KEY",

                                    "SERVICE_LOCATION",

                                    "SUPPLIER_LOCATION",

                                    "ORD_KEY",

                                    "SUP_ITEM_KEY",

                                    "ATA_KEY",

                                    "SUP_KEY",

                                    "EXP_CLASS_CD",

                                    "EXP_DIVISION_CD",

                                    "EXP_COST_ROLLUP_CD",

                                    "EXP_COST_ACCOUNT_CD",

                                    "EXP_COST_SUBCATEGORY_CD",

                                    "INVOICED_RATE",

                                    "INVOICED_QUANTITY",

                                    "INVOICE_LINE_TOTAL",

                                    "DISPUTED_AMOUNT",

                                    "CLAIM_LINE_ITEM_SUM",

                                    "DEBIT_LINE_ITEM_SUM",

                                    "CREDIT_LINE_ITEM_SUM",

                                    "ACTUAL_EXPENSE",

                                    "ACCRUAL_EXPENSE",

                                    "GRAND_TOTAL_EXPENSE",

                                    "ACCRUAL_IND",

                                    "DISTRIBUTED_DT",

                                    "APPROVED_DT"

                                  FROM "EXP_F_EXPENSE";

                                   

                                   

                                  Concatenate

                                   

                                   

                                  [EXP_F_GL]:

                                  SELECT "GL_KEY",

                                    "GL_ACCOUNT_KEY",

                                    "SUP_KEY",

                                    "INV_KEY",

                                    "DATE_KEY",

                                    "ACFT_KEY",

                                    "COMPANY_KEY",

                                    "FLEET_KEY",

                                    "GL_ACCOUNT_NBR",

                                    "EXP_CLASS_CD",

                                    "EXP_DIVISION_CD",

                                    "EXP_COST_ROLLUP_CD",

                                    "EXP_COST_ACCOUNT_CD",

                                    "INV_NBR",

                                    "VENDOR_ID",

                                    "GL_ENTRY_DT",

                                    "GL_POSTED_DT",

                                    "INV_DT",

                                    "EXPENSED_AMOUNT",

                                    "CREDIT_AMOUNT"

                                  FROM ."EXP_F_GL";

                                   

                                   

                                  [EXP_D_DATE]:

                                  SELECT "DATE_KEY",

                                    "COMPANY_KEY" AS "COMPANY_KEY_DATE",

                                      "DATE_VALUE",

                                    "DAY_OF_WEEK_NBR",

                                    "DAY_OF_WEEK_DESC",

                                    "DAY_OF_WEEK_SHORT_DESC",

                                    "WEEK_END_FLG",

                                    "WEEK_IN_MONTH_NBR",

                                    "WEEK_IN_YEAR_NBR",

                                    "WEEK_START_DT",

                                    "WEEK_END_DT",

                                    "DAY_OF_MONTH_NBR",

                                    "MONTH_VALUE",

                                    "MONTH_DESC",

                                    "MONTH_SDESC",

                                    "MONTH_START_DT",

                                    "MONTH_END_DT",

                                    "DAYS_IN_MONTH_NBR",

                                    "LAST_DAY_OF_MONTH_FLG",

                                    "DAY_OF_QUARTER_NBR",

                                    "QUARTER_VALUE",

                                    "QUARTER_DESC",

                                    "QUARTER_START_DT",

                                    "QUARTER_END_DT",

                                    "YEAR_QRTR_VALUE",

                                    "ACC_QRTR_VALUE",

                                    "ACC_YEAR_MONTH_VALUE",

                                    "ACC_YEAR_VALUE",

                                    "LAST_DAY_OF_QUARTER_FLG",

                                    "DAY_OF_YEAR_NBR",

                                    "YEAR_VALUE",

                                    "YEAR_MONTH_VALUE",

                                    "PRIOR_YEAR_VALUE",

                                    "PRIOR_YEAR_QRTR_VALUE",

                                    "PRIOR_QRTR_VALUE",

                                    "FIRST_DAY_OF_MONTH_FLG",

                                    "FIRST_DAY_OF_WEEK_FLG",

                                    "FIRST_DAY_OF_QRTR_FLG",

                                    "FIRST_DAY_OF_YEAR_FLG"

                                  FROM "EXP_D_DATE";

                                   

                                   

                                   

                                   

                                  [EXP_D_INVOICE]:

                                  SELECT "INV_KEY",

                                    "BATCH_KEY",

                                    "COMPANY_KEY" as "COMPANY_KEY_INVOICE",

                                    "SUPPLIER_KEY",

                                    "INV_SOURCE_NM",

                                    "SUPPLIER_INV_NBR",

                                    "INV_SUBJECT_AREA_DESC",

                                    "INV_TYPE_DESC",

                                    "INV_CREATE_DT",

                                    "INV_CREATED_BY_USERNM",

                                    "INV_DT" AS "INV_DATE",

                                    "INV_STATUS_CD",

                                    "INV_STATUS_NM",

                                    "INV_APPROVED_DT",

                                    "BATCH_TRANSFER_ID",

                                    "INV_LOCATION_KEY",

                                    "REMIT_TO_VENDOR_ID",

                                    "FR_GL_POSTED_DT",

                                    "GMP_COVERAGE_YRMO",

                                    "GMP_TRANS_YRMO"

                                  FROM "EXP_D_INVOICE";

                                   

                                  So now my question is

                                  Expense fact table count is 100

                                  and GL_Fact table count is 100

                                  so my Concatenate fact table count should be 200. Am i correct.

                                  But i am getting 210 records.How is its possible.Please check my above query and let me know.

                                   

                                  In my report i used count(Date_Key) then i got 210 records.