analyst-collective / analytics

Open source data models and analysis.
Apache License 2.0
46 stars 11 forks source link

reference models with support for dependency namespacing #36

Closed drewbanin closed 8 years ago

drewbanin commented 8 years ago

At the present time, there is one monolithic Analyst Collective repository. In the future, there will be a rich ecosystem of open source analytical models. In this new world, it will be useful to fully specify a model in a way which is decoupled from the name of the resulting table in Redshift.

-- before
SELECT * from {{ env.schema }}.pardot_visitor_activity;
-- now
SELECT * from {{ ref('pardot_visitor_activity') }};
-- future?
SELECT * from {{ ref('analyst_collective_package', 'pardot_visitor_activity') }};

Tested by cleaning the target dir, compiling sql, and running the resulting code. It works! This should be merged at the same time as https://github.com/analyst-collective/dbt

jthandy commented 8 years ago

👍

let's wait to merge until the dbt branch has been approved.