When there are many sources, dbt-osmosis yaml refactor is often time consuming. In some cases, you may want to use a catalog file to speed up the process. However, dbt-osmosis yaml refactor fails with the following error, even if a catalog file is specified.
% dbt-osmosis yaml refactor --catalog-file target/catalog.json models/sources/my_source.yml
INFO π Executing dbt-osmosis main.py:197
INFO π Searching project stucture for required updates and building action plan osmosis.py:615
INFO ...building project structure mapping in memory osmosis.py:496
INFO π₯ Project structure approved osmosis.py:649
INFO ...building project structure mapping in memory osmosis.py:496
INFO π Processing model: source.my_project.sources.my_source
INFO π Resolving columns in database osmosis.py:799
INFO π¦Ί Unable to resolve columns in database, falling back to using yaml columns as base column set for model osmosis.py:808
source.my_project.sources.my_source
INFO π¬ Looking for actions for source.my_project.sources.my_source osmosis.py:1019
INFO β¨ Schema file is up to date for model source.my_project.sources.my_source osmosis.py:902
What I Changed
Fixed dbt-osmosis yaml refactor to work even for source when retrieving column information from a catalog file.
Motivation
dbt-osmosis is also useful for filling in the list of source columns.
When there are many sources,
dbt-osmosis yaml refactor
is often time consuming. In some cases, you may want to use a catalog file to speed up the process. However,dbt-osmosis yaml refactor
fails with the following error, even if a catalog file is specified.What I Changed
Fixed
dbt-osmosis yaml refactor
to work even for source when retrieving column information from a catalog file.