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

Allow to override the final table name in a database destination #1985

Open
pulsar256 opened this issue Oct 24, 2024 · 1 comment
Open

Allow to override the final table name in a database destination #1985

pulsar256 opened this issue Oct 24, 2024 · 1 comment
Assignees

Comments

@pulsar256
Copy link

pulsar256 commented Oct 24, 2024

Feature description

Currently the table names generated in a database destination (tested with ClickHouse) will be a function of dataset_name and dataset_table_seperator. If we use default values for those configuration options, most likely one will end with a table name generated as

{pipeline_name}_dataset__{resource_name}

This feature request is about adding an option to override the generation of the table name entirely bypassing any internal templating.

Are you a dlt user?

Adopting

Use case

Drop in replacement for other data movement tools which do not expect the downstream pipeline to adapt to naming conventions but give the user full control over destination table names.

Proposed solution

perhaps expose a table naming template string user can specify in the pipeline definition, i.E.:

    pipeline = dlt.pipeline(
        pipeline_name="test",
        destination="clickhouse",
        dataset_name_template="{resource_name}"
    )
@pulsar256 pulsar256 changed the title Allow to override the final table name in the a database destination Allow to override the final table name in a database destination Oct 24, 2024
@rudolfix
Copy link
Collaborator

@pulsar256 we do it to simulate schemas on destinations that do not support it. typically we let users to pass empty dataset name to pipeline to get rid of the naming layout but I see that this is disabled for clickhouse. we can enable it in the next release, seems like not much work

@rudolfix rudolfix self-assigned this Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

No branches or pull requests

2 participants