When get_catalog runs, it needs to return all relations within a schema, hence it cannot be parallelized or scale. It also means that all relations will be returned, not just those managed by dbt.
Solution
Allow for a set of relations to be passed in to limit the query against the database.
add _get_one_catalog_relations method
point _get_one_catalog to this method since the second half is the same
[x] I have run this code in development and it appears to resolve the stated issue
[x] This PR includes tests, or tests are not required/relevant for this PR
[x] This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX
resolves #900
Problem
When
get_catalog
runs, it needs to return all relations within a schema, hence it cannot be parallelized or scale. It also means that all relations will be returned, not just those managed by dbt.Solution
Allow for a set of relations to be passed in to limit the query against the database.
Checklist