singer-python icon indicating copy to clipboard operation
singer-python copied to clipboard

Filter nested properties based on metadata

Open chrisgoddard opened this issue 6 years ago • 6 comments

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.

chrisgoddard avatar Feb 21 '19 01:02 chrisgoddard

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

KAllan357 avatar Mar 06 '19 13:03 KAllan357

Yes - will try to get to this next week.

chrisgoddard avatar Mar 08 '19 20:03 chrisgoddard

Hi Chris, would this also work to filter the properties of nested arrays of objects?

tmonks avatar Sep 04 '20 09:09 tmonks

@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?

judahrand avatar Oct 27 '20 08:10 judahrand

@dmosorast @cmerrick @KAllan357 Tests added in #130

judahrand avatar Oct 27 '20 09:10 judahrand

Worth closing this now that #130 is merged?

judahrand avatar Oct 27 '20 14:10 judahrand