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

feat: using defaults in schema to populate null value in streams #1998

Closed
prakharcode opened this issue Oct 5, 2023 · 2 comments
Closed
Labels
kind/Feature New feature or request valuestream/SDK

Comments

@prakharcode
Copy link
Contributor

Feature scope

Taps (catalog, state, stream maps, tests, etc.)

Description

Currently in JSON schema, we can define default values but this default is used nowhere. If we can use the stream defaults to process the records with default values it would remove the overhead of using post_process in some of these streams by tap developers.

@prakharcode prakharcode added kind/Feature New feature or request valuestream/SDK labels Oct 5, 2023
@prakharcode
Copy link
Contributor Author

I was just reading on how jsonschema is trying to solve defaults and was going through #1471
I think this could be implemented by overriding Draft4Validtor like here and then using that as the format validator.

I can give this a try later, wdyt @edgarrmondragon ?

@prakharcode
Copy link
Contributor Author

tying back to the discussion here

I was able to figure out that we can use this function to populate default values at target.

Just need to override sink's validator like this and then default values would show up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/Feature New feature or request valuestream/SDK
Projects
None yet
Development

No branches or pull requests

1 participant