-
Notifications
You must be signed in to change notification settings - Fork 50
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
[FEATURE] When a nested field has mismatched type print the full path to that nested field #52
Comments
I can't remember, does the script print out the line number of the record with the error? Does that help? The JSON path to the error is a reasonable idea. I'm happy to review a PR if you have something in mind. Otherwise, it might take me a while to get to this, since it won't rise high on my priority list... |
Oh, I understand your problem, you have 2 |
Fixed |
Pushed v1.2 to PyPI. |
Summary
In a complex structure like the following:
If there was an error with another log where
dest_machine.port
was an integer this would error and simply state something like:Ignoring field with mismatched type: old=(hard,port,NULLABLE,STRING); new=(hard,port,NULLABLE,INTEGER)
At this point you are left to figure out which structure this
port
column actually exists in. This is a more simple example but as the schema grows and is more complex, this problem is harder to manually resolve.Ideally, we can track the path to this using a JSON path or dpath expression. Something like
dest_machine.port
. This will likely take adding an additional argument to the recursive functionmerge_schema_entry
. Something like abase_path=None
and continually build up that base_path string in each recursive iteration so that it can be used in the errors like"{}.{}".format(base_path, new_name)
and"{}.{}".format(base_path, old_name)
The text was updated successfully, but these errors were encountered: