Forum Discussion
AndreaF
2 years agoContributor III
Connector rule - Drill back on dimension using a business rule logical operator
Hi,
in a connector business rule, when a dimension has a business rule logical operator, is there a better way to build the SQL drill back query than reverse engineer what the business rule is doing?
In the example below the business rule brings "Zero" to the stage when the source UD1 is null. The code in the drill back is reversing that to get the right source data:
'UD1
If sourceValues.Item(StageTableFields.StageSourceData.DimUD1).ToString.XFEqualsIgnoreCase("Zero") Then
whereClause.Append("And (Department IS NULL Or Department = '') ")
Else
whereClause.Append("And (Department = '" & SqlStringHelper.EscapeSqlString(sourceValues.Item(StageTableFields.StageSourceData.DimUD1).ToString) & "') ")
End IfHowever, this is a simple business rule. I am wondering if there is a way of getting the source data before it is passed through the logical operator business rule, to reduce code complexity in the drill back. Thank you
OneStream doesn't have a "pre-Stage" area, no. I mean, most systems don't even have a Stage area 🙂
If you want to keep track of "pure", pre-transformation values, you have to do it explicitly yourself at Import time. You could do that by mapping original values into an Attribute or Attribute Value field, effectively copying it. When you drillback, you could then look up that AV field to retrieve them. You can do the same for any other identifier that you plan to leverage for drillback purposes (rowIDs or whatever).
3 Replies
- JackLacava
OneStream Employee
OneStream doesn't have a "pre-Stage" area, no. I mean, most systems don't even have a Stage area 🙂
If you want to keep track of "pure", pre-transformation values, you have to do it explicitly yourself at Import time. You could do that by mapping original values into an Attribute or Attribute Value field, effectively copying it. When you drillback, you could then look up that AV field to retrieve them. You can do the same for any other identifier that you plan to leverage for drillback purposes (rowIDs or whatever).
- AndreaFContributor III
Mapping the original values into an Attribute is a very good idea, thank you for this
- WernerNContributor II
Thanks JackLacava​
Do i understand correctly that we could use "StageTableFields.StageSourceData." to get to AttributeValues that were defined in the data source.
I know it is rhetorical since AV does not show up in IntelliSense. would you advise how to, if indeed my assumption is correct, get to an attribute value.
Thanks in advance
Related Content
- 9 months ago
- 1 year ago