Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clickhouse column name encoding problem #4677

Closed
erels opened this issue Feb 23, 2020 · 5 comments · Fixed by #4682
Closed

Clickhouse column name encoding problem #4677

erels opened this issue Feb 23, 2020 · 5 comments · Fixed by #4682

Comments

@erels
Copy link
Contributor

erels commented Feb 23, 2020

Issue Summary

Alias column name contains non 'latin-1' characters return encoding error.
For example : select count(*) as 'כמות'…

Error message: 'latin-1' codec can't encode characters in position 285-288: Body ('כמות') is not valid Latin-1. Use body.encode('utf-8') if you want to send it encoded in UTF-8.

BTW, This works fine with other data source like mysql.

Steps to Reproduce

  1. This is the first step
    Create a query with ClickHouse as the data source

  2. This is the second step, etc.
    Add a column alias in utf8 chars like : select colum1 as 'ש'

Any other info e.g. Why do you consider this to be a bug? What did you expect to happen instead?

I expected to see the column alias like I do with mysql data source .
No problem with the 'utf-8' data, so probably column names should support 'utf-8' charset as well.
This used to work with the older version (v8)

Technical details:

  • Redash Version:
    9.0.0-alpha
  • Browser/OS:
     Chrome
  • How did you install Redash:
    Docker Based Developer Installation
@arikfr
Copy link
Member

arikfr commented Feb 23, 2020

I think that #4627 might fix this. What commit are you on?

@erels
Copy link
Contributor Author

erels commented Feb 23, 2020

Im on 9.0.0-alpha
#4627 looks very similar but its more about the email then the actual data.
Probably, the fix should be similar as well (but here encode the sql data that is going to Clickhouse).

@erels
Copy link
Contributor Author

erels commented Feb 23, 2020

I fixed it in a similar way like #4627
4677

@arikfr
Copy link
Member

arikfr commented Feb 23, 2020

Just to confirm, the version you had with the problem, already had data sent as is without encoding?

@erels
Copy link
Contributor Author

erels commented Feb 23, 2020

Correct. I just appended the encoding to the "data" that was there already and tested it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants