datafold / data-diff

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

@ in redshift password #428

Closed dlawin closed 1 year ago

dlawin commented 1 year ago

Describe the bug When my password includes an "@", I'm unable to use the data-diff CLI, as it causes the url to be parsed incorrectly.

I have only experienced this on redshift, but it likely is an issue for other providers

Make sure to include the following (minus sensitive information): data-diff redshift://user:@Password@redshift:5439/dev schema.table redshift://user:@Password@redshift:5439/dev schema.table -> failed: FATAL: password authentication failed for user "Password"

Quoting, escape sequences, and url escape codes do not resolve.

A .toml file and the --conf option should be a workaround, but I have not had a chance to test that yet: https://docs.datafold.com/os_diff/how_to_use/how_to_use_with_toml

jbonatakis commented 1 year ago

I have also experienced this issue. I tried passing in my password via an environment variable, URL encoding the password, escaping the @, and the toml file -- nothing worked.

dlawin commented 1 year ago

@jbonatakis

I have also experienced this issue. I tried passing in my password via an environment variable, URL encoding the password, escaping the @, and the toml file -- nothing worked.

I was able to workaround this with a toml file. Or are you running into this while trying to use the --dbt feature?

jbonatakis commented 1 year ago

Hmm no I'm definitely still having issues with the toml file. I'm not using the --dbt flag. The same user/password combo connects fine via DataGrip/dbeaver but not with data-diff. When I swap out for another user/password combo without the @ in the password, changing nothing else, I can connect. I'll try to provide some more specific info later.

github-actions[bot] commented 1 year ago

This issue has been marked as stale because it has been open for 60 days with no activity. If you would like the issue to remain open, please comment on the issue and it will be added to the triage queue. Otherwise, it will be closed in 7 days.

github-actions[bot] commented 1 year ago

Although we are closing this issue as stale, it's not gone forever. Issues can be reopened if there is renewed community interest. Just add a comment and it will be reopened for triage.