Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.
This repository was archived by the owner on May 17, 2024. It is now read-only.

config key - key_columns throws error when used in TOML #372

Closed
@alwyndsouza

Description

@alwyndsouza

Describe the bug
key_columns inside TOML config file doesnt work. It throws an error
ERROR - [TableSegment] Attribute 'key_columns' expected value of type tuple[str]. Instead got ['XXXX_ID']

If used in the command line it works.

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

Throws error when using key_columns in config file. It works without errors when using in command line as shown below..

% data-diff --conf ~/config_files/datadiff.toml --run XXXX_bq_csql

[09:53:55] INFO - [PostgreSQL] Starting a threadpool, size=4.
[09:53:57] INFO - Diffing using columns: key=['XXXX_ID'] update=None extra=().
[09:53:57] INFO - Using algorithm 'hashdiff'.
[09:53:57] ERROR - [TableSegment] Attribute 'key_columns' expected value of type tuple[str]. Instead got ['XXXX_ID']

% data-diff --conf ~/config_files/datadiff.toml --run XXXX_bq_csql. -k XXXX_ID

% data-diff --conf ~/config_files/datadiff.toml --run XXXX_bq_csql -k XXXX_ID
[10:00:38] INFO - [PostgreSQL] Starting a threadpool, size=4.
[10:00:41] INFO - Diffing using columns: key=('XXXX_ID',) update=None extra=().
[10:00:41] INFO - Using algorithm 'hashdiff'.
[10:00:41] INFO - Diffing segments at key-range: 0..448966. size: table1 <= 448966, table2 <= 448966
.
.
.

If possible, please paste these as text, and not a screenshot.

Describe the environment

% data-diff --version
v0.3.2

Comparing between BigQuery and Postgres.. But this is a generic error , not database specific

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions