clickhouse-odbc icon indicating copy to clipboard operation
clickhouse-odbc copied to clipboard

Regarding clickhouse connectivity issue with tableau server

Open ananth9999 opened this issue 4 years ago • 8 comments

Hi Team, This is regarding clickhouse connecting to the tableau server.

Please find below the Step we have followed with respect to the same:

  1. Installed click house ODBC in windows server
  2. Connected to clickhouse database from Tableau Desktop and created a report successfully.
  3. While publishing the Report to Tableau Server from Tableau Desktop We are getting the following error

HTTP status code: 400 Received error: Code: 62, e.displayText() = DB::Exception: Syntax error: failed at position 33 (' The table "students" does not exist. Generic ODBC requires additional configuration. The driver and DSN (data source name) must be installed and configured to match the connection. Unable to connect to the server "clickhouse-server" using the driver "ClickHouse ODBC Driver (ANSI)". Check that the server is running and that you have access privileges to the requested database.

This is to inform you that In step 3 We configured clickhouse ODBC in Tableau server(Linux Based). The configuration is as follows: Path : /home/tableau/.odbc.ini [clickhouse] Driver = /opt/clickhouse-odbc-1.1.9-Linux/lib/libclickhouseodbc.so Url = http://default:default@clickhouseip:8123/query?database=default Host = clickhouseip Port = 8123 Path = /query Database = default Username = default Password = default

isql -v clickhouse +---------------------------------------+ | Connected! | | | | sql-statement | | help [tablename] | | quit | | | +---------------------------------------+ SQL> select 1 +----+ | 1 | +----+ | 1 | +----+ SQLRowCount returns 1 1 rows fetched SQL>

can you please help in troubleshooting the same?

ananth9999 avatar Jan 29 '21 06:01 ananth9999

Try to remove database=default from url in odbc.ini if students table not in 'default' database

alexander-chashnikov avatar Jan 29 '21 08:01 alexander-chashnikov

it's in the default database

ananth9999 avatar Jan 29 '21 08:01 ananth9999

Do you use the same DSN name in all systems? Regarding your odbc.ini it should be clickhouse.

alexander-chashnikov avatar Jan 29 '21 09:01 alexander-chashnikov

Yes in both windows & Linux we configured the same name windows: clickhouse Linux : clickhouse

ananth9999 avatar Jan 29 '21 09:01 ananth9999

Can you investigate what query executes on clickhouse from tableau in system.query_log table? If log_queries is not enabled, you can add log_queries=1 to the end of Url in odbc.ini. Also, you can remove unnecessary fields in odbc.ini:

Host = clickhouseip
Port = 8123
Path = /query
Database = default
Username = default
Password = default

or remove Url and leave them.

alexander-chashnikov avatar Jan 29 '21 09:01 alexander-chashnikov

am able to see the query in system.query_log

ananth9999 avatar Jan 29 '21 12:01 ananth9999

I am also facing the same issue, i have created a connection with specific database but i have few joins on physical table and have a logical view , but tableau says the default.table does not exists.

DipalPrajapati avatar Apr 01 '21 14:04 DipalPrajapati

Try using the driver via https://github.com/Altinity/clickhouse-tableau-connector-odbc

traceon avatar Jul 25 '21 12:07 traceon