-
Notifications
You must be signed in to change notification settings - Fork 39
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
Adds unwind processor. #167
base: master
Are you sure you want to change the base?
Conversation
Pull Request Test Coverage Report for Build 561
💛 - Coveralls |
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.
Left a few comments - also don't forget to update PROCESSORS.md
|
||
def func(package): | ||
matcher = ResourceMatcher(resources, package.pkg) | ||
yield package.pkg |
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.
Before yielding here, you can process the datapackage itself and remove the from_key field if source_delete
and from_key != to_key
.
dataflows/processors/unwind.py
Outdated
from dataflows.helpers.resource_matcher import ResourceMatcher | ||
|
||
|
||
def unwind(from_key, to_key, transformer=None, resources=None, source_delete=True): |
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.
I think we should also add here the 'to_key' field (with its type and other options)
(or - if from_key == to_key
- update the field's type accordingly)
TODO: