Destination Table - Condition Amount 0

Started by Anthony Apollisover 1 year ago5 messagesgeneral
Jump to latest
#1Anthony Apollis
anthony.apollis@gmail.com

I need your assistance with an ETL process that runs every six months.
Currently, we are in Calendar Year/FY 2025, which started in July 2024.

The issue is with the "Condition Amount" for FY 2025. Data comes through
correctly until the "Insert Data Into Task" step (please see the attached
screenshot). However, it appears that the code responsible for the "Update
PD Credit" step is not functioning as expected.
[image: image.png]

The destination table [Turkey - NCD Revenue Reporting Model_Table_Model] is
receiving data for FY 2025, but the "*Condition Amount*" column contains
zeros for 2025. Please see the attached sample data for reference.

To help diagnose the issue, I have included the following:

DDL for all three tables.

Insert/Update scripts for the two tasks as depicted in the screenshot above.

Sample raw data for the two tables.

SSIS can also be found attached for better understanding

Sample data for the "Insert Data Into

Attachments:

image.pngimage/png; name=image.pngDownload
POSTGRES.txttext/plain; charset=US-ASCII; name=POSTGRES.txtDownload
invoices raised.pngimage/png; name="invoices raised.png"Download+1-0
LEC Invoices Raised NCD.xlsxapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheet; name="LEC Invoices Raised NCD.xlsx"Download
Key PD Movements.xlsxapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheet; name="Key PD Movements.xlsx"Download
Turkey - NCD Revenue Reporting Model_Table_Model.xlsxapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheet; name="Turkey - NCD Revenue Reporting Model_Table_Model.xlsx"Download
Data of Both Tables Till Insert Data Into Task.xlsxapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheet; name="Data of Both Tables Till Insert Data Into Task.xlsx"Download
#2Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Anthony Apollis (#1)
Re: Destination Table - Condition Amount 0

On 8/8/24 09:35, Anthony Apollis wrote:

I need your assistance with an ETL process that runs every six months.
Currently, we are in Calendar Year/FY 2025, which started in July 2024.

The issue is with the "Condition Amount" for FY 2025. Data comes through
correctly until the "Insert Data Into Task" step (please see the
attached screenshot). However, it appears that the code responsible for
the "Update PD Credit" step is not functioning as expected.

image.png

The destination table [Turkey - NCD Revenue Reporting Model_Table_Model]
is receiving data for FY 2025, but the "*Condition Amount*" column
contains zeros for 2025. Please see the attached sample data for reference.

To help diagnose the issue, I have included the following:

DDL for all three tables.

Insert/Update scripts for the two tasks as depicted in the screenshot above.

Sample raw data for the two tables.

SSIS can also be found attached for better understanding

Sample data for the "Insert Data Into

Honestly I have not looked through all the files and probably won't. I
did find this though:

CASE
WHEN NCD_EXCL."Order Quantity" IS NULL OR NCD_EXCL."Order
Quantity" LIKE 'Excluded' THEN
0
WHEN NCD_EXCL."Order Quantity" LIKE 'NCD Valid' THEN
NCD_AMOUNT."Condition Amount"
ELSE
0

which looks suspicious in that it can turn a "Condition Amount" into 0.

I would start by running the SELECT that this is part of and seeing what
it does to the data and if that is what you want it to do.

--
Adrian Klaver
adrian.klaver@aklaver.com

#3Anthony Apollis
anthony.apollis@gmail.com
In reply to: Adrian Klaver (#2)
Re: Destination Table - Condition Amount 0

The same code bring in values for FY24, 23 etc. Dont understand why FY25's
values are 0.

On Thu, 8 Aug 2024 at 18:56, Adrian Klaver <adrian.klaver@aklaver.com>
wrote:

Show quoted text

On 8/8/24 09:35, Anthony Apollis wrote:

I need your assistance with an ETL process that runs every six months.
Currently, we are in Calendar Year/FY 2025, which started in July 2024.

The issue is with the "Condition Amount" for FY 2025. Data comes through
correctly until the "Insert Data Into Task" step (please see the
attached screenshot). However, it appears that the code responsible for
the "Update PD Credit" step is not functioning as expected.

image.png

The destination table [Turkey - NCD Revenue Reporting Model_Table_Model]
is receiving data for FY 2025, but the "*Condition Amount*" column
contains zeros for 2025. Please see the attached sample data for

reference.

To help diagnose the issue, I have included the following:

DDL for all three tables.

Insert/Update scripts for the two tasks as depicted in the screenshot

above.

Sample raw data for the two tables.

SSIS can also be found attached for better understanding

Sample data for the "Insert Data Into

Honestly I have not looked through all the files and probably won't. I
did find this though:

CASE
WHEN NCD_EXCL."Order Quantity" IS NULL OR NCD_EXCL."Order
Quantity" LIKE 'Excluded' THEN
0
WHEN NCD_EXCL."Order Quantity" LIKE 'NCD Valid' THEN
NCD_AMOUNT."Condition Amount"
ELSE
0

which looks suspicious in that it can turn a "Condition Amount" into 0.

I would start by running the SELECT that this is part of and seeing what
it does to the data and if that is what you want it to do.

--
Adrian Klaver
adrian.klaver@aklaver.com

#4Alban Hertroys
haramrae@gmail.com
In reply to: Anthony Apollis (#3)
Re: Destination Table - Condition Amount 0

On 8 Aug 2024, at 20:07, Anthony Apollis <anthony.apollis@gmail.com> wrote:

The same code bring in values for FY24, 23 etc. Dont understand why FY25's values are 0.

If you use the same code for FY24, then either there’s some filter being applied somewhere that excludes FY25 (and probably beyond), or something in your data changed. My bet is on the latter.

For example, in FY25 the value of NCD_EXCL."Order Quantity" is 'NCD Valid FY25’, which doesn’t match your LIKE expression. Even something like a trailing space to the value could be enough.

Alban Hertroys
--
There is always an exception to always.

#5Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Anthony Apollis (#3)
Re: Destination Table - Condition Amount 0

On 8/8/24 11:07, Anthony Apollis wrote:

The same code bring in values for FY24, 23 etc. Dont understand why
FY25's values are 0.

Because something changed. You will need to go through the process step
by step and verify that the code is current with what is in the FY25 data.

--
Adrian Klaver
adrian.klaver@aklaver.com