datafold / data-diff

Compare tables within or across databases
https://docs.datafold.com
MIT License
2.95k stars 265 forks source link

Not able to use the extra columns parameter #191

Closed akulgoel96 closed 2 years ago

akulgoel96 commented 2 years ago

I am running the current master version of data-diff. However when I run the below command, I am getting an error regarding the columns parameter not getting recognized.

image
erezsh commented 2 years ago

Are you using the latest version? (0.2.4)

Can you please paste this command as text?

akulgoel96 commented 2 years ago

I am using the current master which is unreleased since it has the non-integer ID changes merged in this PR: https://github.com/datafold/data-diff/pull/179. Command: data-diff presto://akul.goel@razorpay.com@trino-dev-coordinator-service.trino-dev.svc.cluster.local:8080/hive/sqoop_api sqoop_api.merchants presto://akul.goel@razorpay.com@trino-dev-coordinator-service.trino-dev.svc.cluster.local:8080/hive/realtime_hudi_api realtime_hudi_api.merchants -k id -v --json --bisection-factor 6 --bisection-threshold 100000000 –c name --min-age=2days -t created_date

erezsh commented 2 years ago

Try to copy+paste this command -

data-diff presto://akul.goel@razorpay.com@trino-dev-coordinator-service.trino-dev.svc.cluster.local:8080/hive/sqoop_api sqoop_api.merchants presto://akul.goel@razorpay.com@trino-dev-coordinator-service.trino-dev.svc.cluster.local:8080/hive/realtime_hudi_api realtime_hudi_api.merchants -k id -v --json --bisection-factor 6 --bisection-threshold 100000000 -c name --min-age=2days -t created_date
akulgoel96 commented 2 years ago

Interesting, this worked. I diffed both the commands and apparently that hyphen is some other unicode character and is causing the issue?

erezsh commented 2 years ago

Yes, that's my guess. (didn't check if it's the hyphen or around it, but same idea)

akulgoel96 commented 2 years ago

Thanks for the prompt help! One final question: how do I pass multiple columns to this parameter? I tried giving it as as a comma separated string but didn't work. Also didn't find any sample values in the github documentation

erezsh commented 2 years ago

Happy to help!

Yes, I think this needs to be better documented.

You can pass -c several times, like -c name -c another.

akulgoel96 commented 2 years ago

Thank you!