pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Getting most records possibly from an Inner/Left Join
2+ messages / 2 participants
[nested] [flat]

* Getting most records possibly from an Inner/Left Join
@ 2023-11-19 11:42  Anthony Apollis <anthony.apollis@gmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Anthony Apollis @ 2023-11-19 11:42 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

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?

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Getting most records possibly from an Inner/Left Join
@ 2023-11-19 13:45  Achilleas Mantzios <a.mantzios@cloud.gatewaynet.com>
  parent: Anthony Apollis <anthony.apollis@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Achilleas Mantzios @ 2023-11-19 13:45 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

Στις 19/11/23 13:42, ο/η Anthony Apollis έγραψε:
>
> For sample data in Excel see 
> https://drive.google.com/file/d/17aOmG-Ynx-6U05wNNrHXJG7iywgCMiuy/view?usp=sharing
>
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.
> ...

-- 
Achilleas Mantzios
  IT DEV - HEAD
  IT DEPT
  Dynacom Tankers Mgmt

^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2023-11-19 13:45 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-11-19 11:42 Getting most records possibly from an Inner/Left Join Anthony Apollis <anthony.apollis@gmail.com>
2023-11-19 13:45 ` Achilleas Mantzios <a.mantzios@cloud.gatewaynet.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox