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

Error while using Null values in Tableau #353

Closed
SergeiStradomsky opened this issue Apr 28, 2021 · 2 comments · Fixed by #356
Closed

Error while using Null values in Tableau #353

SergeiStradomsky opened this issue Apr 28, 2021 · 2 comments · Fixed by #356
Assignees
Labels

Comments

@SergeiStradomsky
Copy link

SergeiStradomsky commented Apr 28, 2021

Hi! We found some error, while using Null values in Tableau.

We get this error in release https://github.com/ClickHouse/clickhouse-odbc/releases/tag/v1.1.9.20201226, but
in release https://github.com/ClickHouse/clickhouse-odbc/releases/tag/v1.1.1.20191108 everything works just fine.

An error occurred while communicating with the Other Databases (ODBC) data source 'oroboros_test_123 (cubes)'
Bad Connection: Tableau could not connect to the data source.
Error Code: B19090E0
unknown type
SELECT SUM({fn CONVERT(NULL, SQL_BIGINT)}) AS sum_Calculation_3063644052176396288_ok
FROM oroboros_test_123
HAVING (COUNT(1) > 0)

This error occurs while creating Calculation Filed like IF FALSE THEN 1 END
How can we fix this?

UPD:
I changed some code here

throw std::runtime_error("unknown type");
, by replacing this line to throw std::runtime_error("unknown type. Got type " + type);
And got next message

An error occurred while communicating with the Other Databases (ODBC) data source 'cubes_clickhouse__fact_ue_partitioned_distributed (cubes)'
Bad Connection: Tableau could not connect to the data source.
Error Code: B19090E0
unknown type. Got type Nothing
SELECT SUM({fn CONVERT(NULL, SQL_BIGINT)}) AS sum_Calculation_3485082461064859648_ok
FROM cubes_clickhouse__fact_ue_partitioned_distributed
HAVING (COUNT(1) > 0)

As far as I can see, there is no type Nothing here

const std::map<std::string, TypeInfo> types_g = {
,
but there is type Nothing in Clickhouse doc https://clickhouse.tech/docs/ru/sql-reference/data-types/special-data-types/nothing/

@SergeiStradomsky
Copy link
Author

Can anyone help with this?

@savelov
Copy link

savelov commented May 18, 2021

Hi Sergei - you need to add mapping to TypeInfo with mapping to some SQL Type and number of bytes required to store it

@traceon traceon self-assigned this Jul 25, 2021
@traceon traceon added the bug label Jul 25, 2021
@traceon traceon mentioned this issue Jul 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants