-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: Add macro signatures, expand README (#1)
* feat: Add macro signatures, expand README * Fix: CI python setup * Fix: dbt deps in CI
- Loading branch information
1 parent
3c708d2
commit b92aecb
Showing
5 changed files
with
58 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,38 @@ | ||
# dbt Activity Schema <!-- omit in toc --> | ||
# dbt-activity-schema <!-- omit in toc --> | ||
|
||
A [dbt-Core](https://docs.getdbt.com/docs/introduction) [package](https://docs.getdbt.com/docs/build/packages#what-is-a-package) which contains macros to self-join an _activity stream_: the primary table in the [Activity Schema](https://github.com/ActivitySchema/ActivitySchema/blob/main/2.0.md) data modelling framework. | ||
|
||
## Table of Contents <!-- omit in toc --> | ||
- [Install](#install) | ||
- [Usage](#usage) | ||
- [Contributions](#contributions) | ||
|
||
## Install | ||
Include in `packages.yml`: | ||
|
||
```yaml | ||
packages: | ||
- git: "https://github.com/tnightengale/dbt_activity_schema.git" | ||
- git: "https://github.com/tnightengale/dbt-activity-schema" | ||
revision: 0.0.1 | ||
``` | ||
For latest release, see | ||
https://github.com/tnightengale/dbt-activity-schema/releases. | ||
## Usage | ||
TODO | ||
Use the `dataset.sql` macro with the appropriate params to generate a self-joined dataset from the activity stream model in your project, eg: | ||
```SQL | ||
{{ | ||
dbt_activity_schema.dataset( | ||
ref("example__activity_stream"), | ||
dbt_activity_schema.primary_activity("All","bought something"), | ||
[ | ||
dbt_activity_schema.append_activity("first_before", "visited page") | ||
] | ||
) | ||
}} | ||
``` | ||
See the signature in the macro for more details on each parameter. | ||
|
||
## Contributions | ||
Contributions and feedback are welcome. Please create an issue if you'd like to contribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
#!/bin/sh | ||
|
||
dbt deps | ||
dbt build -x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters