What’s the recommended pattern to test for a table’s existence? Specifically, we have source tables that are generated outside of dbt, and we want to check whether they exist. Otherwise, dbt will create views of these source tables, but the views won’t reference any data.
I’m aware that there’s a way to do this in a package, but I’m not seeing a model test that can be added in the .yml file. I’m not seeing any source properties that could be used. And data tests succeed when the query returns 0, so a
select count(*) limit 1 can’t be used.