Skip to content

No way to omit parameters for Replicated* table engines constructor #398

@bgo-bc

Description

@bgo-bc

Describe the bug
Clickhouse allows omitting the parameters for Replicated* engines (https://clickhouse.com/docs/engines/table-engines/mergetree-family/replication)

For example, in the text below you would replace:

ENGINE = ReplicatedMergeTree(
    '/clickhouse/tables/{shard}/table_name',
    '{replica}'
)

with:

ENGINE = ReplicatedMergeTree

But in clickhhouse-sqlalchemy, the table_path and replica_name are required parameters:

class ReplicatedMergeTree(ReplicatedEngineMixin, MergeTree):
    def __init__(self, table_path, replica_name,
                 *args, **kwargs):
        ReplicatedEngineMixin.__init__(self, table_path, replica_name)
        MergeTree.__init__(self, *args, **kwargs)

Expected behavior
clickhouse-sqlalchemy should also allow these parameters to be omitted

Versions

  • 0.3.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions