alexander_butler
02/06/2023, 6:54 PMdiscover_streams
to defer to/leverage the the input_catalog
? So basically, if a catalog is provided, it doesn't do anything except "register raw streams" in the mapper.visch
02/06/2023, 7:14 PMdiscover
generates the catalog
, the tap uses the catalog
to run in a "normal" run.alexander_butler
02/06/2023, 7:16 PMrun_discovery
is called. No matter what. Even if a catalog is passed. So for someone who has a discovery that consumes a ton of API calls or is time intensive, it will run every single time.visch
02/06/2023, 7:17 PMalexander_butler
02/06/2023, 7:17 PMvisch
02/06/2023, 7:18 PMalexander_butler
02/06/2023, 7:18 PMdiscover_streams
that is called every timealexander_butler
02/06/2023, 7:18 PMalexander_butler
02/06/2023, 7:18 PMalexander_butler
02/06/2023, 7:19 PMvisch
02/06/2023, 7:20 PMalexander_butler
02/06/2023, 7:21 PMdiscover_streams
but it isn't apparent to the end user they should leverage the input_catalog
attribute inside the discover_streams
to not have to dynamically hit the API.
This is only relevant for poeple who use discover_streams
dynamically like for the Salesforce SDK tap I am working onalexander_butler
02/06/2023, 7:21 PMalexander_butler
02/06/2023, 7:22 PMvisch
02/06/2023, 7:30 PMcatalog
discover, doesn't run but trying to find some examples and I haven't dove into this exact path / issue.visch
02/06/2023, 7:36 PMtap-postgres
https://github.com/MeltanoLabs/tap-postgres/blob/main/tap_postgres/tap.py#L38-L49
https://github.com/meltano/sdk/blob/main/singer_sdk/tap_base.py#L551-L570 is the caching mechanism that I think you're asking about too.alexander_butler
02/06/2023, 7:45 PMdiscover_streams
if your tap was dynamic.
I think therein lies my mistakealexander_butler
02/06/2023, 7:45 PMvisch
02/06/2023, 7:47 PMcatalog_dict
which get's generated if a catalog wasn't passed to the tap.
The interface is a bit tricky (not intuitive unfortunately) so I totally understand where you're coming from (I haven't had an HTTP tap yet where I needed to dynamically generate schemas so I haven't had to exactly do what you're after right now but the postgres example is close).visch
02/06/2023, 7:48 PMcatalog_dict
you may be in a good spot.visch
02/06/2023, 7:49 PMalexander_butler
02/06/2023, 7:50 PM