recce icon indicating copy to clipboard operation
recce copied to clipboard

[DRC-755] [Feature] Compare Renamed Columns

Open tkrishna-equip opened this issue 1 year ago • 3 comments

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

DRC-755

tkrishna-equip avatar Oct 03 '24 15:10 tkrishna-equip

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 avatar Oct 04 '24 01:10 popcornylu

@popcornylu are you proposing using the ordinal position of the column as an option for Recce to compare values? I support that idea!

tkrishna-equip avatar Oct 04 '24 15:10 tkrishna-equip

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.

even-wei avatar Oct 08 '24 01:10 even-wei