Skip to content

Commit

Permalink
Merge pull request #124 from MartinGuindon/docs/improve-readme
Browse files Browse the repository at this point in the history
Improve README.md for newcomers
  • Loading branch information
drewbanin authored Mar 11, 2019
2 parents 3be8b25 + 8f247d5 commit 3616714
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
This [dbt](https://github.com/fishtown-analytics/dbt) package contains macros that can be (re)used across dbt projects.

## Getting started

To use dbt-utils:

1. Reference the package in your dbt project by creating a `packages.yml` file, which should look something like:

```
packages:
- git: "https://github.com/fishtown-analytics/dbt-utils.git"
revision: 0.1.22
```
The revision key pins the dependency on a specific release of dbt-utils. Consult the [releases](https://github.com/fishtown-analytics/dbt-utils/releases) for information about the latest release.

2. Install the package by executing `dbt deps`

Detailed information on packages can be found in dbt's documentation in the [Package Management](https://docs.getdbt.com/docs/package-management) section.

----

## Macros
### Cross-database
#### current_timestamp ([source](macros/cross_db_utils/current_timestamp.sql))
Expand Down Expand Up @@ -132,7 +151,7 @@ version: 2

models:
- name: model_name
tests:
tests:
- dbt_utils.recency:
datepart: day
field: created_at
Expand All @@ -152,7 +171,7 @@ models:
- name: col_name
tests:
- dbt_utils.at_least_one


```

Expand Down

0 comments on commit 3616714

Please sign in to comment.