Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(SEC): strategy execution score #37

Merged
merged 1 commit into from
Mar 24, 2023
Merged

Conversation

igoromote
Copy link
Contributor

β˜• Purpose

A brief summary about the purpose of this PR.

🧐 Checklist

  • A feature that will work with this PR
  • A feature that I'm still working on

🐞 Testing

A brief description about how the reviewer can test my PR.

# don't forget to insert cli commands

🍩 Further details

Anything that the reviewer should know before approving it.

πŸ”— Related PRs

This PR is related to some other PRs in different services, they are:

calendar c
join {{ ref('dim__team') }} t on c.day >= t.created_at
),
team_active_cycle as (
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Until this one is just creating a table that compute which cycle was active in each day for each team

and tc.day <= c.date_end
and c.company_id = tc.company_id
),
cycles_with_expected_progress_by_week as (
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Get expected progress by week according to cycle's start date, end date and calendar date

from
team_active_cycle
),
krs_per_cycles_with_expected_progress_by_week as (
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Get all KRs from cycle. Note this could be calculated before, but I don't think it change anything

where
co.name = 'Bud'
),
check_in_by_week as (
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Get highest or lowest check-in each week

krs_per_cycles_with_expected_progress_by_week.cycle_id,
krs_per_cycles_with_expected_progress_by_week.expected_progress
),
temp_helper as (
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This temporary table is to help get "last value not null for a KR".
What would happen without this is: if a KR has check-in in week 1 and 3, but didn't have in week2, it would create a empty value in ours graphs

cycle_id,
week
),
check_in_by_week_copy_last_non_null_value as (
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fill null values with previous check-in as I said before

@igoromote igoromote merged commit c789fdc into main Mar 24, 2023
@igoromote igoromote deleted the feat/strategy_execution_score branch March 24, 2023 20:30
@igoromote igoromote mentioned this pull request Mar 26, 2023
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants