jeffvdt
21 days agoNew Contributor III
Best practice for filtering vStageSourceAndTargetDataWithAttributes by Workflow
Hi everyone,
I am building a query using the vStageSourceAndTargetDataWithAttributes view and I want to ensure I am retrieving the latest figures for a specific Entity and Time period.
I have a few questions regarding the best way to filter this:
- Filtering by Wfk: I know that hardcoding a GUID for the Wfk (Workflow Key) is risky because it can change between environments or if a profile is reset. What is the recommended way to dynamically filter for a specific Workflow Profile? Should I be joining on the WorkflowProfileHierarchy table/view to filter by ProfileName?
- Latest Figures: If multiple imports have occurred, does filtering by a specific Wfk automatically ensure I am seeing the "latest" iteration of the data, or is there a better field to use for partitioning/ranking the results?
Any code snippets or best practices for making these stage queries robust would be highly appreciated.