Using UTF-8 encoding for clickhouse POST data

This commit is contained in:
Jayke.Lin 2016-12-12 11:05:16 +08:00 committed by GitHub
parent 3cf6e31727
commit d4534d6045

View File

@ -62,7 +62,7 @@ class ClickHouse(BaseSQLQueryRunner):
return schema.values()
def _send_query(self, data, stream=False):
r = requests.post(self.configuration['url'], data=data, stream=stream, params={
r = requests.post(self.configuration['url'], data=data.encode("utf-8"), stream=stream, params={
'user': self.configuration['user'], 'password': self.configuration['password'],
'database': self.configuration['dbname']
})