Skip to content

Certain column types are not supported for PK #26

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

Open
ramyamasani opened this issue May 21, 2025 · 0 comments
Open

Certain column types are not supported for PK #26

ramyamasani opened this issue May 21, 2025 · 0 comments
Labels
bug Something isn't working triage

Comments

@ramyamasani
Copy link

Describe the bug
Date and Varchar columns are not supported for PK.
Here are the error messages.

2025-03-14 06:45:49,562 - root - ERROR - Cannot use a column of type Date(_notes=[], precision=6, rounds=True) as a key
Traceback (most recent call last):
  File "/app/src/main.py", line 180, in get_table_diff
    for difference in data_diff.diff_tables(
  File "/usr/local/lib/python3.10/site-packages/data_diff/diff_tables.py", line 96, in __iter__
    for i in self.diff:
  File "/usr/local/lib/python3.10/site-packages/data_diff/diff_tables.py", line 282, in _diff_tables_wrapper
    raise error
  File "/usr/local/lib/python3.10/site-packages/data_diff/diff_tables.py", line 255, in _diff_tables_wrapper
    yield from self._diff_tables_root(table1, table2, info_tree)
  File "/usr/local/lib/python3.10/site-packages/data_diff/diff_tables.py", line 290, in _diff_tables_root
    return self._bisect_and_diff_tables(table1, table2, info_tree)
  File "/usr/local/lib/python3.10/site-packages/data_diff/diff_tables.py", line 314, in _bisect_and_diff_tables
    raise NotImplementedError(f"Cannot use a column of type {kt} as a key")
NotImplementedError: Cannot use a column of type Date(_notes=[], precision=6, rounds=True) as a key

2025-05-17 14:21:31,903 - root - ERROR - Error processing diffs for table platform-mysql-prod-usa-kw.dms.gannettdigital.com.rl_kbas.ControlAll: Cannot use a column of type Text(_notes=[], collation=None) as a key
2025-05-17 14:21:31,904 - root - ERROR - Cannot use a column of type Text(_notes=[], collation=None) as a key 

Make sure to include the following (minus sensitive information):

Describe the environment

Describe which OS you're using, which data-diff version, and any other information that might be relevant to this bug.

@ramyamasani ramyamasani added the bug Something isn't working label May 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage
Projects
None yet
Development

No branches or pull requests

1 participant