Skip to content

Commit

Permalink
Rename activity_schema_ref to activity_schema (#19)
Browse files Browse the repository at this point in the history
The documentation for
[`Dataset`](https://github.com/tnightengale/dbt-activity-schema#dataset-source)
lists `activity_stream` as the required param name for reference the
stream table. This currently returns the following error
```
Compilation Error in rpc request (from remote system.sql) macro 'dbt_macro__dataset' takes no keyword argument 'activity_stream'
```

A closer look at the macro shows that the expected param name is
actually `activity_stream_ref`. This PR updates the macro to use the
documented name `activity_stream`.
  • Loading branch information
jacobiajohnson authored Mar 21, 2023
1 parent bdf5c43 commit 31f1579
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions macros/dataset.sql
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{% macro dataset(
activity_stream_ref,
activity_stream,
primary_activity,
appended_activities=[]
) %} {{ return(adapter.dispatch("dataset", "dbt_activity_schema")(
activity_stream_ref,
activity_stream,
primary_activity,
appended_activities
)) }} {% endmacro %}

{% macro default__dataset(
activity_stream_ref,
activity_stream,
primary_activity,
appended_activities
) %}
Expand Down Expand Up @@ -44,7 +44,7 @@ filter_activity_stream_using_primary_activity as (
{{ alias_column(col) }}{%- if not loop.last -%},{%- endif %}
{% endfor %}

from {{ activity_stream_ref }} as {{ stream() }}
from {{ activity_stream }} as {{ stream() }}

where {{ alias_column(columns.activity) }} = {{ dbt.string_literal(primary_activity.name) }}
and {{ primary_activity.relationship.where_clause }}
Expand All @@ -66,7 +66,7 @@ filter_activity_stream_using_primary_activity as (

from filter_activity_stream_using_primary_activity as {{ stream() }}

left join {{ activity_stream_ref }} as {{ stream(i) }}
left join {{ activity_stream }} as {{ stream(i) }}
on (
-- Join on Customer UUID Column
{{ stream(i) }}.{{ columns.customer }} = {{ stream() }}.{{ columns.customer }}
Expand Down

0 comments on commit 31f1579

Please sign in to comment.