# Release: dbt v0.13.0

**URL:** <https://discourse.getdbt.com/t/release-dbt-v0-13-0/277>\
**Category:** Archive\
**Created:** [March 22, 2019, 2:54pm UTC](https://discourse.getdbt.com/t/release-dbt-v0-13-0/277 "2019-03-22T14:54:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![drew](https://sea2.discourse-cdn.com/flex020/user_avatar/discourse.getdbt.com/drew/32/9_2.png) [@drew](https://discourse.getdbt.com/u/drew)\
**Post date:** [March 22, 2019, 2:54pm UTC](https://discourse.getdbt.com/t/release-dbt-v0-13-0/277/1 "2019-03-22T14:54:46Z")

</div>

## dbt v0.13.0 - Stephen Girard

dbt v0.13.0 provides [a stable API for building new adapters](https://docs.getdbt.com/v0.13/docs/building-a-new-adapter) and reimplements dbt’s adapters as “plugins”. We’ve used this API to reimplement the existing adapters of dbt, and also to add a couple of new ones:

- [Redshift](https://github.com/fishtown-analytics/dbt/tree/dev/wilt-chamberlain/plugins/redshift)
- [Postgres](https://github.com/fishtown-analytics/dbt/tree/dev/wilt-chamberlain/plugins/postgres)
- [BigQuery](https://github.com/fishtown-analytics/dbt/tree/dev/wilt-chamberlain/plugins/bigquery)
- [Snowflake](https://github.com/fishtown-analytics/dbt/tree/dev/wilt-chamberlain/plugins/snowflake)
- [Presto](https://github.com/fishtown-analytics/dbt-presto) **(new)**
- [Spark](https://github.com/fishtown-analytics/dbt-spark) **(new)**

Beyond adapters, this release of dbt also includes [Sources](https://docs.getdbt.com/v0.13/docs/using-sources) which can be used to document and test source data tables.

Check out some more info about this release of dbt below!

## Sources [(docs)](https://docs.getdbt.com/docs/using-sources)

Sources are the missing link between dbt models and source data tables. Historically, dbt users referenced source tables by typing out the qualified name of a database relation, eg:

```auto
-- models/snowplow/base/snowplow_events.sql

select *
from snowplow.event

```

While this system worked, it meant that dbt didn’t have any knowledge about the most crucial part of the graph: data sources! In dbt v0.13.0, you can now define and describe data sources in [yml files](https://docs.getdbt.com/docs/using-sources#section-defining-sources), then reference them from your models. All told, sources work like this:

**Source definition:**

```auto
# models/snowplow/base/events.yml

version: 2
sources:
  - name: snowplow
    tables:
      - name: event

```

**Base model:**

```auto
-- models/snowplow/base/snowplow_events.sql

select *
from {{ source('snowplow', 'event') }}

```

You can use the link between sources and models to select models in a dbt run. This selector will run all of the models that select from snowplow data.

```bash
$ dbt run --models source:snowplow+

```

Sources will render in the [documentation website](https://docs.getdbt.com/docs/documentation-website). You’ll be able to view the descriptions and tests for these sources, and they’ll also appear in the dependency graph visualization.

### Source Freshness

Sources can be configured to “snapshot freshness” for your source tables. If a `freshness` config is provided, then dbt can optionally assert that your tables have been loaded within the boundaries of your SLAs. Check out the docs on [source freshness](https://docs.getdbt.com/docs/using-sources#section-snapshotting-source-data-freshness) for more information. **Note:** if you use dbt Cloud, you can see a visual representation of your data source freshness that looks something like this:

 ![28%20AM](https://us1.discourse-cdn.com/flex020/uploads/getdbt/original/1X/bc7e683f6702efcdfc3a29589975c1fbbd414cab.jpeg)

If you’re not using dbt Cloud, you can still run `dbt source snapshot-freshness` to assert the freshness constraints on your tables, but you’ll need to inspect dbt’s exit codes to determine if an error has occurred.

## Model selection [(docs)](https://docs.getdbt.com/reference#section-the-at-operator)

In dbt v0.13.0, we added a new type of model selector: `@`. This selector will run all of the models downstream of the selected models, as well as the _parents_ of those models. If you want to run all of the models that depend on a model, _as well as all of the parents of those models_, you can do that with:

```bash
$ dbt run --models @model_name

```

The selector `@snowplow_web_page_context` will select all of the models shown here:

 ![at-selector](https://us1.discourse-cdn.com/flex020/uploads/getdbt/original/1X/14a6169a05e0d95b99736c8db930058b51b6bcb3.png)

## require-dbt-version [(docs)](https://docs.getdbt.com/v0.13/docs/requiring-dbt-versions)

The `require-dbt-version` config helps ensure that dbt projects are run against supported versions of dbt. This is especially useful for packages (which might contain backwards-incompatible code), or the deployment of a dbt project within a large team. If users try to run a project with an unsupported version of dbt installed, then they’ll see a helpful error like this:

```auto
This version of dbt is not supported with the 'my_project' package.
    Installed version of dbt: =0.13.0
    Required version of dbt for 'my_project': ['>=0.12.0', '<0.13.0']
  Check the requirements for the 'my_project' package, or run dbt again with --no-version-check

```

## Tab Completion

Check out the newly-released tab-completion script for Bash [here](https://github.com/fishtown-analytics/dbt-completion.bash) – stave that carpal tunnel off a little longer 🙂

## Odds n’ Ends

There are lots of other helpful features and fixes in v0.13.0, check out the [release notes](https://github.com/fishtown-analytics/dbt/releases) for the full rundown.

**tl;dr**

- Add an output line indicating the installed version of dbt to every run
- Add support for Snowflake Key Pair Authentication ([docs](https://docs.getdbt.com/v0.13/docs/profile-snowflake#section-key-pair-authentication))
- Support SSO Authentication for Snowflake ([docs](https://docs.getdbt.com/v0.13/docs/profile-snowflake#section-sso-authentication))
- Add support for Snowflake’s transient tables ([docs](https://docs.getdbt.com/v0.13/docs/snowflake-configs#section-transient-tables))
- Capture build timing data in `run_results.json` to visualize project performance
- Add CLI flag to toggle warnings as errors ([docs](https://docs.getdbt.com/v0.13/reference#section-treat-warnings-as-errors))

## Contributors

Thanks for your contributions to dbt!

- [@patrickgoss](https://github.com/patrickgoss) [#1193](https://github.com/fishtown-analytics/dbt/issues/1193)
- [@brianhartsock](https://github.com/brianhartsock) [#1191](https://github.com/fishtown-analytics/dbt/pull/1191)
- [@alexyer](https://github.com/alexyer) [#1232](https://github.com/fishtown-analytics/dbt/pull/1232)
- [@adriank-convoy](https://github.com/adriank-convoy) [#1224](https://github.com/fishtown-analytics/dbt/pull/1224)
- [@mikekaminsky](https://github.com/mikekaminsky) [#1216](https://github.com/fishtown-analytics/dbt/pull/1216)
- [@vijaykiran](https://github.com/vijaykiran) [#1198](https://github.com/fishtown-analytics/dbt/pull/1198), [#1199](https://github.com/fishtown-analytics/dbt/pull/1199)
