Thread: Getting most records possibly from an Inner/Left Join
For sample data in Excel see https://drive.google.com/file/d/17aOmG-Ynx-6U05wNNrHXJG7iywgCMiuy/view?usp=sharing
(1) The fact table is from SAP.
(2) Dimension Tables are named "B Masked". Please note that none of the tables had primary keys, I had to bring them in myself. In the Bracs Mapping tab of this file, there is a column GCoA which is the Account Number. Then there is BRACS which is the Bracs(source) Account number. these numbers match the same columns in the Mapping tab of the Cash Flow Pivoted file.
(3) The Source Data is a combination and shorter version of the Mapping tab. Column Account match GCoA and BRACS Account match
matches BRACS in the Bracs mapping tab above of the B Masked file.
I noticed some similarities in the different tabs/tables so I denormalised some tabs/tables. e.g. Region Mapping and Entity Mapping in the same file I made as 1 table.
Joining on not unique keys is of concern.
(4) Cash Flow file, tab Sap Source is a pivoted table of the Source Data.
(5) The Cash Flow tab is the final reporting structure that must be replicated in power. Column "G" in this tab is the "Function" column in the Pivoted tab.
I do left joins to the Fact table and some inner join. Please advise.
The Function column that makes up the bulk of giving meaning to the figures, most of the detail of this column is left out when I do a join as seen in Imeta_Bracs_Roll_Up joined to Fact file with SQL code.
I brought in the Mapping table to connect the roll-up table to it as seen in Imeta_Bracs_Roll_Up joined to Bridge, this query takes. very long to run. Also, the joins take a lot of memory and some ETL/SSIS tasks may fail. What would you be bettering in this instance?
Please note that you can increase the chances of having your thoughts be read if you describe your problem using SQL or something the community can understand and refrain from giving external links for downloading files. Many people won't click on your URL or hit the download button.For sample data in Excel see https://drive.google.com/file/d/17aOmG-Ynx-6U05wNNrHXJG7iywgCMiuy/view?usp=sharing
...
-- Achilleas Mantzios IT DEV - HEAD IT DEPT Dynacom Tankers Mgmt