[DRC-755] [Feature] Compare Renamed Columns
Describe the feature
is there a way to compare columns if one is renamed in the PR? Example: Column A gets renamed to Column B, but we want to compare the values in Column A in the old model to Column B in the new model
Describe alternatives you've considered
Have looked into using a macro from audit_helper but it would be great to use this within Recce
Who will this benefit?
Column names are frequently changed for clarity, sometimes in tandem with a logic update. Having this functionality available will allow as to validate that the column values have not changed unexpectedly, even though the original column has been replaced.
Are you interested in contributing this feature?
No response
Anything else?
No response
Hi @tkrishna-equip , thanks for your feedback.
Since it's quite difficult to determine in Recce whether two columns are originally the same, do you think comparing A and B using different queries would solve your problem?
Base query:
select
customer_id,
name as user_name,
life_time_value
from customers
Current query:
select
customer_id,
user_name,
life_time_value
from customers
The limitation is that both query results need to have the same columns. This is very similar to the audit_helper's solution
@popcornylu are you proposing using the ordinal position of the column as an option for Recce to compare values? I support that idea!
Idea: Provide a way to way SQL for the base and current separately in query diff.
- (Bonus) Model renaming can be covered as well
- In the future, we may support advanced diffs.