Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/new materializations #94

Closed
wants to merge 11 commits into from
Closed

Conversation

drewbanin
Copy link
Contributor

Summary:

This branch implements ephemeral and incremental models.

Usage:

models:
  package_name:
    events:
      materialized: ephemeral 
    sessions:
      materialized: incremental
      sql_where: "collector_tstamp > (select max(collector_tstamp) from {{this}})"

Description:

Ephemeral models will be injected as CTEs into any model that ref()erences them. Ephemeral models are part of the dependency graph and generally function like any other model, except ephemeral models are not compiled to their own files or directly created in the database.

Incremental models will create a new table if the table doesn't already exist, or insert new records into the existing table if it does already exist. New records are determined by the sql_where field. The {{this}} parameter points to the model name, in this case sessions.

@jthandy
Copy link
Member

jthandy commented Aug 9, 2016

@drewbanin just want to make sure that, prior to pushing this to pypi, your release notes include the fact that this is a breaking change and you let folks know how to update their dbt_project.yml files. I mean--this doesn't say it, but I think you changed true/false to be table/view, right?

@drewbanin drewbanin added this to the 0.4.0 milestone Aug 15, 2016
@drewbanin drewbanin closed this Aug 15, 2016
@drewbanin drewbanin deleted the feature/new-materializations branch August 16, 2016 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants