Hello In my custom rest tap I want extract only fi...
# troubleshooting
i
Hello In my custom rest tap I want extract only fields that I need, but it doesn’t work with nested objects In my schema definition I have
Copy code
th.Property(
    "car_info",
    th.ObjectType(
        th.Property("mark", th.StringType),
        th.Property("model", th.StringType)
    )
),
but I get
{"car_info": {"body_type": "ALLROAD_5_DOORS", "engine_type": "DIESEL",  "mark": "PORSCHE", "model": "CAYENNE"}}
How can I skip fields that I don’t need?
a
In the SDK, fields that are undefined by your schema will generally be removed by default - so you might not need to do anything more than you've done already. The user may see a log message that the undefined properties were ignored. To be more explicit, you can optionally use
post_process()
to remove or "pop" the properties you don't want to pass on.
i
Ignoring doesn’t work with nested properties Thanks, I’ll try post_process()
a
Yes, that's right. Gotcha. Then yes, post_process() would be the best bet 👍
In the future, it would be great to have something like
ignored_properties
as a set of property paths. A lighter weight way of telling the SDK "I know these fields exist and yes, I'm ignoring them on purpose. 🙂 "