-
Notifications
You must be signed in to change notification settings - Fork 128
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
Filter nested properties based on metadata #94
base: master
Are you sure you want to change the base?
Conversation
Update filter_data_by_metadata function to allow filtering of nested fields - e.g. if property `address` has selected set to True, but property `address.street` has selected set to False, only the street would be excluded. Processes data recursively.
make formatting a little clearer
Fix array type breadcrumb name
breadcrumb path documentation
change based on tests - must remove field from data object, not just set value to None.
line lenght :)
There are tests in for the Transform code. Do you think you could write a few to show this works as expected? https://github.com/singer-io/singer-python/blob/master/tests/test_transform.py#L263 |
Yes - will try to get to this next week. |
Hi Chris, would this also work to filter the properties of nested arrays of objects? |
@dmosorast @cmerrick @KAllan357 If I write some tests for this could this be merged? I need this functionality for |
@dmosorast @cmerrick @KAllan357 |
Worth closing this now that #130 is merged? |
Not sure if this will be too big a change, but I wanted to be able to filter out nested properties based on metadata rather than just top level properties.
So if I have a field
billing_address
of typeobject
with the propertiesstreet
,state
,zip
, andcountry
, I could haveselected: True
forbilling_address
, butbilling_address.street
could beselected: False
.The result would be the three other fields (
state
,zip
andcountry
) would be synced.All tests pass - it shouldn't break any existing use cases because it will only filter out nested fields that are explicitly unselected or unsupported.