alex
09/04/2024, 12:28 PM{
'id': 123,
'name': 'abc',
'address': {
'street': 'abc',
'city': 'abc',
'zip': 111,
},
'items': ['x', 'y', 'z'],
}
My solution so far is to either
• explode the "dictionaries" if the response does not contain "lists"
• or to make the same API call several times within different streams. One stream for the top-level columns (base table), another stream for the level-1 columns (sub-table). another stream for the level-2 columns (sub-sub-table), and so on. Each time adjusting the expected schema and filtering for the desired columns in the "*parse_response*" function.
For small responses and/or APIs with no rate limit, this is feasible, but it feels far from ideal.
Does Meltano have a functionality to aid me here?visch
09/04/2024, 1:43 PMstream
is a different "table"
This example you're giving is hard to help you, but if you give something concrete from an actual API I'd bet we can give recommendations.
Generally you leave the json alone in the stream (just make a jsonschema element for the list) or it's important enough to split to another stream and you use Parent / Child streams https://sdk.meltano.com/en/v0.40.0/parent_streams.html
Very dependent on what you want as a tap developer / consumer