#2809 feat: Child stream that runs after all records synced by parent stream
Issue created by
ReubenFrankel
Feature scope
Taps (catalog, state, tests, etc.)
Description
I'm imagining something like
class ParentStream(Stream):
def get_deferred_child_context(self, records, context)
return {"record_ids": [record["id"] for record in records]}
class DeferredChildStream(Stream):
parent_stream_type = ParentStream
def get_records(self, context):
for record_id in context["record_ids"]:
...
This would useful to support APIs that offer supplemental "detail" endpoints (e,g,
GET /resource/details
) that accept one or more resource identifiers in bulk (request body data), rather than one at a time (e.g.
GET /resources/{id}/details
) as is the case in a traditional parent-child stream relationship. I don't really know enough about context or state here to fully understand the implications of something like this, but it feels possible.
meltano/sdk