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

Python utility clickhouse_table_checksum fails for data_types database #358

Closed
subkanthi opened this issue Nov 3, 2023 · 2 comments
Closed
Assignees
Labels
GA-1 All the issues that are issues in release(Scheduled Dec 2023) high-priority qa-verified label to mark issues that were verified by QA

Comments

@subkanthi
Copy link
Collaborator

2023-11-03 13:58:30,788 - ERROR - MainThread - Traceback (most recent call last):
  File "/home/kanthi/.local/lib/python3.10/site-packages/clickhouse_driver/dbapi/cursor.py", line 111, in execute
    response = execute(
  File "/home/kanthi/.local/lib/python3.10/site-packages/clickhouse_driver/client.py", line 296, in execute
    rv = self.process_ordinary_query(
  File "/home/kanthi/.local/lib/python3.10/site-packages/clickhouse_driver/client.py", line 482, in process_ordinary_query
    return self.receive_result(with_column_types=with_column_types,
  File "/home/kanthi/.local/lib/python3.10/site-packages/clickhouse_driver/client.py", line 143, in receive_result
    return result.get_result()
  File "/home/kanthi/.local/lib/python3.10/site-packages/clickhouse_driver/result.py", line 50, in get_result
    for packet in self.packet_generator:
  File "/home/kanthi/.local/lib/python3.10/site-packages/clickhouse_driver/client.py", line 159, in packet_generator
    packet = self.receive_packet()
  File "/home/kanthi/.local/lib/python3.10/site-packages/clickhouse_driver/client.py", line 176, in receive_packet
    raise packet.exception
clickhouse_driver.errors.ServerException: Code: 47.
DB::Exception: Missing columns: '_sign' while processing query: 'SELECT concat(toString(my_row_id), if(col1 IS NULL, '', concat('#', toString(col1))), if(col2 IS NULL, '', concat('#', toString(col2))), if(col3 IS NULL, '', concat('#', toString(col3))), '#', toString(_version), '#', toString(is_deleted), '#', if(col1 IS NULL, '1', '0'), if(col2 IS NULL, '1', '0'), if(col3 IS NULL, '1', '0')) AS hash FROM test.add_test FINAL WHERE (1 = 1) AND (_sign > 0) ORDER BY my_row_id ASC', required columns: '_sign' 'my_row_id' 'col2' '_version' 'col1' 'col3' 'is_deleted', maybe you meant: 'my_row_id', 'col2', '_version', 'col1', 'col3' or 'is_deleted'. Stack trace:


python3 db_compare/mysql_table_checksum.py --mysql_host localhost --mysql_user root --mysql_password root  --mysql_database $DATABASE --tables_regex "^*" --debug_output
python3 db_compare/clickhouse_table_checksum.py --clickhouse_host localhost --clickhouse_user root --clickhouse_password root  --clickhouse_database test --tables_regex "^*" --debug_output --exclude_columns=_sign

@aadant aadant changed the title Python utility clickhouse_table_checksum fails for datatypes database Python utility clickhouse_table_checksum fails for data_types database Nov 12, 2023
@aadant
Copy link
Collaborator

aadant commented Nov 17, 2023

it is fixed now
use

 --sign_column ""

we could default it to empty string or do it automatically if the columns is in the list of excluded column

@aadant aadant self-assigned this Nov 17, 2023
@subkanthi subkanthi added the GA-1 All the issues that are issues in release(Scheduled Dec 2023) label Dec 18, 2023
@Selfeer Selfeer added the qa-verified label to mark issues that were verified by QA label Feb 8, 2024
@subkanthi
Copy link
Collaborator Author

Added to python documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GA-1 All the issues that are issues in release(Scheduled Dec 2023) high-priority qa-verified label to mark issues that were verified by QA
Projects
None yet
Development

No branches or pull requests

3 participants