-
Notifications
You must be signed in to change notification settings - Fork 185
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
Pydantic improvements #901
Conversation
✅ Deploy Preview for dlt-hub-docs canceled.
|
ae2471e
to
e83504c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great stuff - I think the behavior between pydantic and other complex constructs is not 100% consistent yet in cases where skip_complex_types = False
. I left some comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hooray, great stuff 🙌
0abf999
to
6556f1b
Compare
7218345
to
8a58ac0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO we have an edge case when there's pydantic model defined and we have skip_complex_types
set to true. please see my review
b347fd9
to
6037b04
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sultaniman this looks good now. and I know where the problems with duckdb come from. we have a special area in tests suite for local pipeline tests
tests/pipeline/test_pipeline_extra
you can move your tests there, our workflow will make sure that duckdb and pydantic are installed
4d84a02
to
ebe6ced
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic LGTM!
@sultaniman this code asks for unit tests. we have unit tests for the mapper in libs. why you didn't add the tests there? please test all combinations explictly
@rudolfix do you mean to add tests for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! thanks for all the tests!
This PR is to address the issue #895 which is when pydantic column schema is provided.
Adjustment recursively calls
pydantic_to_table_schema_columns
to expand for sub model.