joe_enser
12/20/2024, 8:26 PMtap-rest-api-msdk
(widen variant) to extract data from an api and have data coming out of it that looks something like this:
{
"teams": [
{"id": 1, ...},
{"id": 2, ...},
{"id": 3, ...}
]
}
When this gets loaded in my target (postgres), it just dumps the entire json data into a single row column as a string. Is there a way to have meltano parse out the "teams" array and load each into its own row?Edgar Ramírez (Arch.dev)
12/20/2024, 9:15 PMteams
here a record of the stream on question, or is teams
part of a larger record?
If it's the former, you might wanna take a look at `records_path`:
`records_path`: optional: a jsonpath string representing the path in the requests response that contains the records to process. Defaults to.$[*]
Edgar Ramírez (Arch.dev)
12/20/2024, 9:15 PMjoe_enser
12/20/2024, 9:23 PMteams
is a record.
I just tried using records_path
like this: records_path: $['teams']
And am getting this error:
ValueError: Input must be a dict object.
Also tried: records_path: $['teams'][*]
and get this error:
Run invocation could not be completed as block failed: Extractor failed
Any thoughts on what I'm doing wrong here?joe_enser
12/20/2024, 9:53 PMEdgar Ramírez (Arch.dev)
12/20/2024, 10:57 PM