SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Derived Column Transformations - Performance-related


Derived Column Transformations - Performance-related

Author
Message
naramsg
naramsg
Valued Member
Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)

Group: General Forum Members
Points: 70 Visits: 201
Hi,

I'm working on an ETL package (General Ledger) where I use a Conditional Split to split the input into two outputs (O1 and O2) based on the Account Type. Below the Conditional Split, I use Derived Column transformations for both O1 and 02. The Derived Column transformation looks like this:

O1:
ETLDT: @[User::CETDT]
GroupNum: 11
Flag: 1
GLAmount: (DebitAmount - CreditAmount)


O2:
ETLDT: @[User::CETDT]
GroupNum: 11
Flag: 1
GLAmount: (CreditAmount - DebitAmount)


As you can see, the Derived Columns ETLDT, GroupNum and Flag are common in both O1 and O2. Also, they do not impact the Conditional Split in any way.

I am a little confused about whether I should use the same approach as mentioned above, or if I should add a separate Derived Column above the Conditional Split for the ETLDT, GroupNum and Flag derived columns, <b>in order to get optimal performance</b>.

Kindly help!
Chandra Sekhara Vyas Dhara
Chandra Sekhara Vyas Dhara
SSCarpal Tunnel
SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)

Group: General Forum Members
Points: 4203 Visits: 1149
What is criteria for arriving Debit Amount and Credit Amount?



Sunny-138471
Sunny-138471
SSC-Enthusiastic
SSC-Enthusiastic (198 reputation)SSC-Enthusiastic (198 reputation)SSC-Enthusiastic (198 reputation)SSC-Enthusiastic (198 reputation)SSC-Enthusiastic (198 reputation)SSC-Enthusiastic (198 reputation)SSC-Enthusiastic (198 reputation)SSC-Enthusiastic (198 reputation)

Group: General Forum Members
Points: 198 Visits: 266
I believe this approach is fine because it may not make sense manually adding the condition for account type (which would be required if derived column transform done above conditional split transform) when the conditional split transform is already doing that. Secondly the number of operations are going to be the same and are not duplicated for both the conditions.
naramsg
naramsg
Valued Member
Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)

Group: General Forum Members
Points: 70 Visits: 201
Thanks for the response, guys! I eventually discarded this approach and went ahead with 'Debit - Credit' regardless of Account Type. This, I was told by a few Finance guys, was the way to go from a functional perspective.

But I guess this post would be useful in the future for those who face similar situations when working on ETL for other industries.

Thanks a ton, guys! I really appreciate it. :-)
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search