ClickHouse / clickhouse-tableau-connector-jdbc

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

Frequent error pop-up for Tableau JDBC connection with clickhouse #79

Open SyedORMAE opened 3 months ago

SyedORMAE commented 3 months ago

Hello! I am facing the following issue (every now and then) when I am attempting to connect via Clickhouse JDBC. Currently, for JDBC SSL is unchecked. Can someone advise if this can be avoided?

image
yurifal commented 3 months ago

Had it been working before (with the same connection settings)? There's something wrong with the proxy (nginx) on the Azure side, I suspect.

SyedORMAE commented 3 months ago

Hi Yurifal, It opened for some time. But when I added another measure value. It started giving this error.

yurifal commented 3 months ago

What if you save the workbook (with the latest mods), close the Desktop, then open the wb again? Does the error persist?

SyedORMAE commented 3 months ago
image

The error: An error occurred while communicating with ClickHouse JDBC by ClickHouse, Inc. Bad Connection: Tableau could not connect to the data source. Error Code: FAB9A2C5 Error executing subquery id: "22"

502 Bad Gateway

502 Bad Gateway


nginx

, server ClickHouseNode [uri=https://clickhouse-bayerp.ds-engine.sc-navigator.azure.cnb:443/default, options={sslmode=NONE,custom_http_params=join_use_nulls=1,typeMappings=UInt64=java.lang.String,UInt128=java.lang.String,Int128=java.lang.String,UInt256=java.lang.String,Int256=java.lang.String,socket_timeout=300000}]@-78279158 Connector Class: clickhouse_jdbc, Version: 0.2.6 SELECT "t0"."Calculation_1350235489405878272" AS "Calculation_1350235489405878272", "t0"."Calculation_1350235489406832642" AS "Calculation_1350235489406832642", min("t0"."Snapshot Name") AS "Snapshot Name", sum("report_master_demand_supply_matching"."Feasible Sales (€)") AS "sum:Feasible Sales (€):ok" FROM "rscp"."report_master_demand_supply_matching" "report_master_demand_supply_matching" INNER JOIN ( SELECT "report_master_demand_supply_matching"."Product" AS "Product (report_master_demand_supply_matching)", "report_master_demand_supply_matching"."Location" AS "Location (report_master_demand_supply_matching)", "report_master_demand_supply_matching"."Period" AS "Period (report_master_demand_supply_matching)", "report_master_demand_supply_matching"."Snapshot-Id" AS "Snapshot-Id (report_master_demand_supply_matching)", "report_master_demand_supply_matching"."Sub-Scenario Name" AS "Sub-Scenario Name (report_master_demand_supply_matching)", "report_master_demand_supply_matching"."Sub-Scenario-Id" AS "Sub-Scenario-Id (report_master_demand_supply_matching)", min((CASE WHEN POSITION("report_master_demand_supply_matching"."Sub-Scenario Name", '1%_inc') > 0 THEN '1% incr' WHEN POSITION("report_master_demand_supply_matching"."Sub-Scenario Name", '1%_Inc') > 0 THEN '1% incr' WHEN POSITION("report_master_demand_supply_matching"."Sub-Scenario Name", '3%_inc') > 0 THEN '3% incr' WHEN POSITION("report_master_demand_supply_matching"."Sub-Scenario Name", '3%_Inc') > 0 THEN '3% incr' WHEN POSITION("report_master_demand_supply_matching"."Sub-Scenario Name", '5%_inc') > 0 THEN '5% incr' WHEN POSITION("report_master_demand_supply_matching"."Sub-Scenario Name", '5%_Inc') > 0 THEN '5% incr' WHEN POSITION("report_master_demand_supply_matching"."Sub-Scenario Name", '10%_inc') > 0 THEN '10% incr' WHEN POSITION("report_master_demand_supply_matching"."Sub-Scenario Name", '10%_Inc') > 0 THEN '10% incr' WHEN POSITION("report_master_demand_supply_matching"."Sub-Scenario Name", '1%_dcr') > 0 THEN '1% Dcr' WHEN POSITION("report_master_demand_supply_matching"."Sub-Scenario Name", '1%_Dcr') > 0 THEN '1% Dcr' WHEN POSITION("report_master_demand_supply_matching"."Sub-Scenario Name", '3%_dcr') > 0 THEN '3% Dcr' WHEN POSITION("report_master_demand_supply_matching"."Sub-Scenario Name", '3%_Dcr') > 0 THEN '3% Dcr' WHEN POSITION("report_master_demand_supply_matching"."Sub-Scenario Name", '5%_dcr') > 0 THEN '5% Dcr' WHEN POSITION("report_master_demand_supply_matching"."Sub-Scenario Name", '5%_Dcr') > 0 THEN '5% Dcr' WHEN POSITION("report_master_demand_supply_matching"."Sub-Scenario Name", '10%_dcr') > 0 THEN '10% Dcr' WHEN POSITION("report_master_demand_supply_matching"."Sub-Scenario Name", '10%_Dcr') > 0 THEN '10% Dcr' WHEN POSITION("report_master_demand_supply_matching"."Sub-Scenario Name", 'Mu - 1 sigma') > 0 THEN 'Mu - 1 sigma' WHEN POSITION("report_master_demand_supply_matching"."Sub-Scenario Name", '1.Mu-_1_sigma') > 0 THEN 'Mu - 1 sigma' WHEN POSITION("report_master_demand_supply_matching"."Sub-Scenario Name", 'Mu - 2/3 sigma') > 0 THEN 'Mu - 2/3 sigma' WHEN POSITION("report_master_demand_supplymatching"."Sub-Scenario Name", 'Mu-_2/3_sigma') > 0 THEN 'Mu - 2/3 sigma' WHEN POSITION("report_master_demand_supply_matching"."Sub-Scenario Name", 'Mu - 1/3 sigma') > 0 THEN 'Mu - 1/3 sigma' WHEN POSITION("report_master_demand_supplymatching"."Sub-Scenario Name", 'Mu-_1/3_sigma') > 0 THEN 'Mu - 1/3 sigma' WHEN POSITION("report_master_demand_supply_matching"."Sub-Scenario Name", 'Mu + 1/3 sigma') > 0 THEN 'Mu + 1/3 sigma' WHEN POSITION("report_master_demand_supplymatching"."Sub-Scenario Name", 'Mu+_1/3_sigma') > 0 THEN 'Mu + 1/3 sigma' WHEN POSITION("report_master_demand_supply_matching"."Sub-Scenario Name", 'Mu + 2/3 sigma') > 0 THEN 'Mu + 2/3 sigma' WHEN POSITION("report_master_demand_supplymatching"."Sub-Scenario Name", 'Mu+_2/3_sigma') > 0 THEN 'Mu + 2/3 sigma' WHEN POSITION("report_master_demand_supply_matching"."Sub-Scenario Name", 'Mu + 1 sigma') > 0 THEN 'Mu + 1 sigma' WHEN POSITION("report_master_demand_supplymatching"."Sub-Scenario Name", 'Mu+_1_sigma') > 0 THEN 'Mu + 1 sigma' ELSE 'Baseline' END)) AS "Calculation_1350235489405878272", min((CASE WHEN POSITION("report_master_demand_supply_matching"."Sub-Scenario Name", 'FourWeekCompleteShutdown') > 0 THEN '4 Wks' WHEN POSITION("report_master_demand_supply_matching"."Sub-Scenario Name", 'EightWeekCompleteShutdown') > 0 THEN '8 Wks' WHEN POSITION("report_master_demand_supply_matching"."Sub-Scenario Name", 'TwelveWeeksCompleteShutdown') > 0 THEN '12 Wks' ELSE '0 Wks' END)) AS "Calculation_1350235489406832642", "report_master_demand_supply_matching_aie"."Snapshot Name" AS "Snapshot Name" FROM "rscp"."report_master_demand_supply_matching" "report_master_demand_supply_matching" INNER JOIN "rscp"."report_master_demand_supply_matching_aie" "report_master_demand_supply_matching_aie" ON (("report_master_demand_supply_matching"."Product" = "report_master_demand_supply_matching_aie"."Product") AND ("report_master_demand_supply_matching"."Location" = "report_master_demand_supply_matching_aie"."Location") AND ("report_master_demand_supply_matching"."Period" = "report_master_demand_supply_matching_aie"."Period") AND ("report_master_demand_supply_matching"."Snapshot-Id" = "report_master_demand_supply_matching_aie"."Snapshot-Id") AND ("report_master_demand_supply_matching"."Sub-Scenario Name" = "report_master_demand_supply_matching_aie"."Sub-Scenario Name") AND ("report_master_demand_supply_matching"."Sub-Scenario-Id" = "report_master_demand_supply_matching_aie"."Sub-Scenario-Id")) WHERE ("report_master_demand_supply_matching_aie"."Snapshot Name" = 'PTZ_Demand Run_SCN 5- Baseline - 16th May 11:00 Am - Demand Variability Updated') GROUP BY "Location (report_master_demand_supply_matching)", "Period (report_master_demand_supply_matching)", "Product (report_master_demand_supply_matching)", "Snapshot Name", "Snapshot-Id (report_master_demand_supply_matching)", "Sub-Scenario Name (report_master_demand_supply_matching)", "Sub-Scenario-Id (report_master_demand_supply_matching)" ) "t0" ON (("report_master_demand_supply_matching"."Product" = "t0"."Product (report_master_demand_supply_matching)") AND ("report_master_demand_supply_matching"."Location" = "t0"."Location (report_master_demand_supply_matching)") AND ("report_master_demand_supply_matching"."Period" = "t0"."Period (report_master_demand_supply_matching)") AND ("report_master_demand_supply_matching"."Snapshot-Id" = "t0"."Snapshot-Id (report_master_demand_supply_matching)") AND ("report_master_demand_supply_matching"."Sub-Scenario Name" = "t0"."Sub-Scenario Name (report_master_demand_supply_matching)") AND ("report_master_demand_supply_matching"."Sub-Scenario-Id" = "t0"."Sub-Scenario-Id (report_master_demand_supply_matching)")) GROUP BY "Calculation_1350235489405878272", "Calculation_1350235489406832642"

SyedORMAE commented 3 months ago

Yes, the above error appeared after reopening after closing

yurifal commented 3 months ago

It well may be the (complicated) query to trigger the connection error. If the connection is fine on a new clean workbook, there's not the problem of the connector. Couldn't help more without looking at the actual workbook / sheet.

SyedORMAE commented 3 months ago

I created a new file and it stopped giving the error with more or less same filters...

yurifal commented 3 months ago

Nice