This could be useful when paired with custom schemas. For example, there could be a users table in both the snowplow_analytics and product_analytics schemas. Behind these scenes, these models would be named something like snowplow_users.sql and product_users.sql, respectively.
Config would look like:
-- models/snowplow/snowplow_users.sql
{{ config(alias='users', schema='snowplow_analytics') }}
select * from ...
dbt would need to enforce uniqueness between schema + aliased_name
馃憤 This would be tremendously helpful when migrating to dbt so as to ensure parity with existing data infrastructures that were not built with dbt in mind.
Happy to help contribute to this :)
I just merged https://github.com/fishtown-analytics/dbt/pull/800 which implements this feature. Thanks for all of your hard work @abelsonlive and @jon-rtr :)
This will go out in our 0.10.2 release!
thank you so much for bringing this one home! happy independence day. go eat a burger :p
Most helpful comment
馃憤 This would be tremendously helpful when migrating to
dbtso as to ensure parity with existing data infrastructures that were not built withdbtin mind.