Skip to content

Commit

Permalink
makes from more flexible
Browse files Browse the repository at this point in the history
  • Loading branch information
mjirv committed Jun 25, 2022
1 parent 212d14d commit 47d7844
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ _Transforms any time series model with a user ID and event labels into a standar

```sql
{{ dbt_product_analytics.event_stream(
from="orders",
from=ref('orders'),
event_type_col="status",
user_id_col="customer_id",
date_col="order_date",
Expand All @@ -44,7 +44,7 @@ _Runs a funnel analysis, i.e. tells you how many users performed step 1 followed
```sql
{% set events =
dbt_product_analytics.event_stream(
from="orders",
from=ref('orders'),
event_type_col="status",
user_id_col="customer_id",
date_col="order_date",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% set events =
dbt_product_analytics.event_stream(
from="orders",
from=ref('orders'),
event_type_col="status",
user_id_col="customer_id",
date_col="order_date",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{ dbt_product_analytics.event_stream(
from="orders",
from=ref('orders'),
event_type_col="status",
user_id_col="customer_id",
date_col="order_date",
Expand Down
2 changes: 1 addition & 1 deletion macros/event_stream.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
end_date=none)
%}
select {{ event_type_col }} as event_type, {{ user_id_col }} as user_id, {{ date_col }} as event_date
from {{ ref(from) }}
from {{ from }}
where 1 = 1
{% if start_date is not none %}
and {{ date_col }} >= '{{ start_date }}'
Expand Down

0 comments on commit 47d7844

Please sign in to comment.