Skip to content

Commit 990d8b7

Browse files
authored
Merge pull request #22 from dwreeves/21-bugfix
[Bugfix] `group_by=` doesn't work for >1 grouped variable
2 parents 854edbb + 263f991 commit 990d8b7

File tree

5 files changed

+460
-493
lines changed

5 files changed

+460
-493
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
### `0.2.6`
4+
5+
- Fix bug with `group_by` on multiple variables; contributed by [@svkohler](https://github.com/dwreeves/dbt_linreg/issues/21).
6+
37
### `0.2.5`
48

59
- Fix bug where `exog` and `group_by` did not handle `str` inputs e.g. `exog="x"`.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Add this the `packages:` list your dbt project's `packages.yml`:
3232

3333
```yaml
3434
- package: "dwreeves/dbt_linreg"
35-
version: "0.2.5"
35+
version: "0.2.6"
3636
```
3737
3838
The full file will look something like this:
@@ -43,7 +43,7 @@ packages:
4343
# Other packages here
4444
# ...
4545
- package: "dwreeves/dbt_linreg"
46-
version: "0.2.5"
46+
version: "0.2.6"
4747
```
4848
4949
# Examples

dbt_project.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: "dbt_linreg"
2-
version: "0.2.5"
2+
version: "0.2.6"
33

44
# 1.2 is required because of modules.itertools.
55
require-dbt-version: [">=1.2.0", "<2.0.0"]

macros/linear_regression/utils/utils.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ inner join {{ join_to }}
221221
on
222222
{%- for _ in group_by %}
223223
{{ join_from }}.gb{{ loop.index }} = {{ join_to }}.gb{{ loop.index }}
224-
{%- if not loop.last -%}
224+
{% if not loop.last -%}
225225
and
226226
{%- endif %}
227227
{%- endfor %}

0 commit comments

Comments
 (0)