ClickHouse / clickhouse-tableau-connector-jdbc

Tableau connector to ClickHouse using JDBC driver
Apache License 2.0
57 stars 9 forks source link

Can't connect #52

Closed gregoryzubenko closed 1 year ago

gregoryzubenko commented 1 year ago

I have so many issues connecting to the clickhouse server , i have just notices that on the instruction you can add the name of the database but I can't see that on my page , is that okay or my doing smthng wrong ?

image

yurifal commented 1 year ago

The "database" (actually the "schema") could be selected after the connection is made (next dialog screen):

Screenshot 2023-04-20 at 15 11 23 Screenshot 2023-04-20 at 15 11 52
gregoryzubenko commented 1 year ago

Okay but i still have this issue :

I have tried to reinstall the drivers, used all the workarounds but nothing seems to be working

image

yurifal commented 1 year ago

If you connect via http (port 8123) you don't need SSL.

gregoryzubenko commented 1 year ago

i doesn't change anything

image

yurifal commented 1 year ago

Oh that's another error message. It tells that the "analytics" user is belonging to the "readonly" Profile (configured server-wide I guess). There's no permission for the users with the "readonly" Profile to change the session variables (such as SET join_use_nulls=1).

You may want to ask your DBA to GRANT the necessary SELECT rights to the "analytics" user via general SQL DML statements, so the "analytics" user could be able to read from the schema / tables without being a member of the "readonly" Profile.

Alternatively, you may want to use yet another connector for ClickHouse -- namely, the ODBC one by Altinity Inc (present on a Connectors pane right in Desktop). This connector has no "IN/OUT Set" capability, thus no need to change the session vars ;-)

gregoryzubenko commented 1 year ago

Thank you! I have tried using ODBC but I can't set up drivers either

gregoryzubenko commented 1 year ago

This is the querry that created my user for the database :

CREATE USER analytics IDENTIFIED WITH plaintext_password BY 'xxx' SETTINGS PROFILE 'readonly' GRANT SHOW TABLES, SELECT ON database.* TO analytics

What should i change in it to be able to work with tableaU?

yurifal commented 1 year ago

Just remove the SETTINGS PROFILE 'readonly' from the CREATE statement

EduarddOjog commented 1 year ago

Hi,

I got this error message.

image

Do you have any idea why?

yurifal commented 1 year ago

No idea. Could you please share the connection screen, or describe what are you trying to accomplish?

vlauzeckas commented 1 year ago

do you get this error while connecting to clickhouse or already when trying to build data source from view/table?

EduarddOjog commented 1 year ago

image

EduarddOjog commented 1 year ago

image

i got this error when i tried to connect

yurifal commented 1 year ago

Can you make a successful connection to this CH instance (localhost:443) with any other SQL client via JDBC (for example DBeaver)? Could you please share? imho the port 443 is for https (SSL flag ON), and the default https port for CH is 8443.

EduarddOjog commented 1 year ago

I have successul connection to CH via VS code and DBeaver. Also do you know what exactly driver i need to paste in tableau?

yurifal commented 1 year ago

Could you please share the DBeaver connection screen (with the actual hostname / username dimmed)?

EduarddOjog commented 1 year ago

image

yurifal commented 1 year ago

In Tableau set the SSL (checkbox) to ON

EduarddOjog commented 1 year ago

I tried also with that SSL checked but same error.

yurifal commented 1 year ago

OK, let's test in another way. Could you please connect to the play.clickhouse.com:443 using the explorer / clickhouse as the user / password?

Screenshot 2023-04-26 at 15 19 58

If successful, it would mean that you have both the JDBC driver and the Tableau CH connector set up properly.

EduarddOjog commented 1 year ago

Server: play.clickhouse.com Port: 443 Username: explorer Password: password?

are these credentials correct?

yurifal commented 1 year ago

Password : clickhouse

EduarddOjog commented 1 year ago

Done guys. I did it. Thank you!

EduarddOjog commented 1 year ago

Hi again, When I`m trying to publish my workbook I got this error message. image Do you know what kind of tableau version should I use or how to install this plugin..I dont know..

yurifal commented 1 year ago

Publishing a workbook on the server would require both the JDBC driver and the Connector to be installed on the server host.

The README contains the instructions (how to install on a server).

EduarddOjog commented 1 year ago

Could you help me with the link to the correctly README?

EduarddOjog commented 1 year ago

And I also dont have a tableau server. Just a Tableau Online

yurifal commented 1 year ago

https://github.com/analytikaplus/clickhouse-tableau-connector-jdbc/blob/main/README.md

Tableau Online (Cloud) -- no way to connect to CH Live. The only option is using the Bridge (hence the extract): https://help.tableau.com/current/online/en-us/data_fresh_sync_section.htm