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

Simplify schema management - Specifying preferred_types without full schema definitions #1015

Open
khoadaniel opened this issue Feb 27, 2024 · 0 comments
Labels
community This issue came from slack community workspace

Comments

@khoadaniel
Copy link

khoadaniel commented Feb 27, 2024

Feature description

dlt should let users specify preferred_types or other concerned configurations in the import-schema yaml without requiring users to provide a full schema description.

Are you a dlt user?

Yes, I run dlt in production.

Use case

I need to specify preferred_types within my schema settings to ensure all ID-related fields are treated as text. Here's a snippet (from the import-yaml file) for context:

settings:
  preferred_types:
    re:.*id.*: text

To apply this settings, I need to keep the rest of the schema (which I do not want to maintain) in the import-yaml.
If I delete any of the following from the import-schema yaml file, dlt would fail.

  • tables
  • normalizers
    or even
  • version_hash

Example error:

<class 'dlt.common.exceptions.DictValidationException'>
In .: following required fields are missing {'tables'}

So given a normal user experience, I care only about a few config lines to govern my schema, but I have to declare the rest of the yaml file. I think this is not a good practice.

Proposed solution

dlt should let users specify preferred_types or other concerned configurations in the import-schema yaml without requiring users to provide a full schema description.

Related issues

No response

@rudolfix rudolfix added the community This issue came from slack community workspace label Feb 29, 2024
@rudolfix rudolfix moved this from Todo to Planned in dlt core library Mar 18, 2024
@rudolfix rudolfix moved this from Planned to Todo in dlt core library Apr 22, 2024
@rudolfix rudolfix moved this from Todo to Planned in dlt core library May 1, 2024
@rudolfix rudolfix moved this from Planned to Todo in dlt core library Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community This issue came from slack community workspace
Projects
Status: Todo
Development

No branches or pull requests

2 participants