-
Notifications
You must be signed in to change notification settings - Fork 48
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
Values of the generated columns in MySQL are not transfered to the ClickHouse table #459
Comments
Related to: #429 |
Good catch. A fullname is generated and virtual by default, so they are not transmitted in the binary log and should not be inserted but only calculated in CH. Please note that a generated column can be stored (currently we do not support this, the equivalent in CH would be MATERIALIZED, not ALIAS). see also https://bugs.mysql.com/bug.php?id=101978 A difference with MySQL is that the ALIAS or MATERIALIZED columns are not visible by default in CH see also ClickHouse/ClickHouse#19659 |
JDBC metadata doesnt have information if the column is Alias, have to try other ways to identify if the column is ALIAS ``` SELECT * Query id: 9d7d9549-e308-40f2-968e-46e19d457d3c ┌─table_catalog─┬─table_schema─┬─table_name─┬─TABLE_SCHEMA─┬─TABLE_NAME─┬─column_name─┬─ordinal_position─┬─column_default─────────────────────┬─is_nullable─┬─data_type────────┬─character_maximum_length─┬─character_octet_length─┬─numeric_precision─┬─numeric_precision_radix─┬─numeric_scale─┬─datetime_precision─┬─character_set_catalog─┬─character_set_schema─┬─character_set_name─┬─collation_catalog─┬─collation_schema─┬─collation_name─┬─domain_catalog─┬─domain_schema─┬─domain_name─┬─column_comment─┬─column_type──────┐
|
Fixed in #443. Mapped to MATERIALIZED and passed jdbc configuration variable to insert to materialized columns |
If we create a table in MySQL that has a generated column it is created in ClickHouse but if in MySQL we insert the data into that table it is not transferred to ClickHouse table.
For example,
If after inserting the value we check the table in ClickHouse we see that it's empty
The build used:
altinityinfra/clickhouse-sink-connector:443-14a14ba5c18fb3bc9f57c48d9a5079d4d6fe15e8-lt
ClickHouse Version:
23.11.1.2711
MySQL Version:
8.2.0
The error in logs
The text was updated successfully, but these errors were encountered: