In my dbt project file, I have specified the location for most of my models as follows:
analytics_100_stripe:
warehouse: stitch_database
database: stitch_database
schema: analytics_100_stripe
materialized: table
transient: false
copy_grants: true
I want some models to output in a database outside of stitch_database, and grant some external users access to only this database, but I need to pull from the same stitch_database source tables. I have determined this output as follows:
analytics_external:
warehouse: stitch_database
database: analytics_external
schema: analytics_external_data
materialized: table
transient: false
copy_grants: true
When I run the model, I get the following message. I have granted the dbt user all necessary permissions, I believe. But this error still feels like a permissions issue.
14:38:28 Encountered an error:
Runtime Error
Database error while listing schemas in database “analytics_external”
Database Error
002043 (02000): SQL compilation error:
Object does not exist, or operation cannot be performed.
Is it not possible to output models into a different database than the one I am pulling from?