singer-python
singer-python copied to clipboard
Filter nested properties based on metadata
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 type object
with the properties street
, state
, zip
, and country
, I could have selected: True
for billing_address
, but billing_address.street
could be selected: False
.
The result would be the three other fields (state
, zip
and country
) 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.
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 tap-shopify
. I'm happy to discuss my use case with one of you on Slack?
@dmosorast @cmerrick @KAllan357 Tests added in #130
Worth closing this now that #130 is merged?