Curious to know how anyone here would approach thi...
# singer-tap-development
m
Curious to know how anyone here would approach this problem. I'm writing a tap that queries a paginated API containing CSV files, with the intention to use the default Postgres target. I then read each file and emit each row. Each CSV file has 1 of 4 different schemas which I've declared with the Meltano Singer SDK - I want each of these file schemas to be separate tables in Postgres. I've declared each file type as a separate stream. I essentially want the main stream to 'fan out' to the individual file streams and they can choose to ignore the file if it matches the type. How have others approached this?
e
Sounds like it's almost a good use case for parent-child streams. You could but the file type in the context dictionary and have the
get_records
implementation of each file type stream finish early if the context doesn't match its expected file type.
m
Thanks @Edgar Ramírez (Arch.dev) - I actually ended up giving up on using the SDK and implementing something myself, it seemed to add too much complexity for a fairly simple use case.
👍 1