Lines 42 & 43 of int_jira__user_metrics to be revisited as the column alias names appear to be flipped. While the code still runs, this creates an issue down the line with the columns output by jira__user_enhanced.sql, specifically avg_age_currently_open_seconds and avg_close_time_seconds.
Relevant error log or model output
Before: Below is the output when the model is run as it stands. When looking at output, it is most easily observable in rows where the count is 0 in one column and not 0 in the other. For example in row 2, the count_closed... = 1, however the value for avg_close_time_seconds is null, however, we would expect this to be a non-zero value. Further, in this row, we would expect the average to equal the median since there is only 1 closed task. See also rows 3 and 6 for similar issues.
After: After switching the variable names, we get the expected outcome. The value is not null, and the average is the same as the median.
Expected behavior
Code is updated.
dbt Project configurations
n/a
Package versions
0.8.2
What database are you using dbt with?
bigquery
dbt Version
1.2.0
Additional Context
No response
Are you willing to open a PR to help address this issue?
[X] Yes.
[ ] Yes, but I will need assistance and will schedule time during our office hours for guidance
Is there an existing issue for this?
Describe the issue
Lines 42 & 43 of int_jira__user_metrics to be revisited as the column alias names appear to be flipped. While the code still runs, this creates an issue down the line with the columns output by jira__user_enhanced.sql, specifically
avg_age_currently_open_seconds
andavg_close_time_seconds
.Relevant error log or model output
Before: Below is the output when the model is run as it stands. When looking at output, it is most easily observable in rows where the count is 0 in one column and not 0 in the other. For example in row 2, the
count_closed...
= 1, however the value foravg_close_time_seconds
is null, however, we would expect this to be a non-zero value. Further, in this row, we would expect the average to equal the median since there is only 1 closed task. See also rows 3 and 6 for similar issues.After: After switching the variable names, we get the expected outcome. The value is not null, and the average is the same as the median.
Expected behavior
Code is updated.
dbt Project configurations
n/a
Package versions
0.8.2
What database are you using dbt with?
bigquery
dbt Version
1.2.0
Additional Context
No response
Are you willing to open a PR to help address this issue?