Skip to content

Commit

Permalink
🔥 feat: remove company property
Browse files Browse the repository at this point in the history
  • Loading branch information
Bilbottom committed Aug 10, 2024
1 parent 8e41669 commit 8180da2
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 48 deletions.
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ repos:
- id: sqlfluff-lint
name: Lint SQL files
files: "^billiam_database/models/.*.sql$"
exclude: ".*" # Exclude all files for now
additional_dependencies:
- duckdb==0.9.2
- dbt-duckdb==1.7.3
Expand Down
11 changes: 0 additions & 11 deletions billiam_database/models/presentation/_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,17 +136,6 @@ models:
- The entry has over-stated how much time was spent on the task
because time was spent on other tasks before 10:00 and after 10:00.
- name: company
data_type: varchar
constraints:
- type: not_null
- type: check
expression: "company IN ('TSB', 'Jaja', 'Allica', 'Sainsbury''s')"
description: >
The employer at the time of recording.
In a future iteration of this project, this will instead be captured
in a seed with the from- and to- employment dates.
- name: pl__task_details
description: '{{ doc("pl__task_details") }}'
config:
Expand Down
1 change: 0 additions & 1 deletion billiam_database/models/presentation/pl__daily_tracker.sql
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ final as (
project,
detail,
minutes,
company
from stg_tracker
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
# - input: ref("stg__daily_tracker")
# rows:
# # prettier-ignore
# - {date_time: "2018-04-23 08:15:00", project: "BAU Task", detail: "Task 1", minutes: 15, company: "TSB"}
# - {date_time: "2018-04-23 08:30:00", project: "BAU Task", detail: "Task 2", minutes: 15, company: "Jaja"}
# - {date_time: "2018-04-23 08:45:00", project: "BAU Task", detail: "Task 3", minutes: 15, company: "Allica"}
# - {date_time: "2018-04-23 09:00:00", project: "BAU Task", detail: "Task 4", minutes: 15, company: "Sainsbury's"}
# - {date_time: "2018-04-23 08:15:00", project: "BAU Task", detail: "Task 1", minutes: 15}
# - {date_time: "2018-04-23 08:30:00", project: "BAU Task", detail: "Task 2", minutes: 15}
# - {date_time: "2018-04-23 08:45:00", project: "BAU Task", detail: "Task 3", minutes: 15}
# - {date_time: "2018-04-23 09:00:00", project: "BAU Task", detail: "Task 4", minutes: 15}
# - input: ref("int__transaction_items")
# rows:
# # prettier-ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ unit_tests:
- input: ref("stg__daily_tracker")
rows:
# prettier-ignore
- {date_time: "2019-04-23 08:15:00", project: "BAU Task", detail: "Task 1", minutes: 15, company: "TSB"}
- {date_time: "2019-04-23 08:30:00", project: "BAU Task", detail: "Task 2", minutes: 15, company: "Jaja"}
- {date_time: "2019-04-23 08:45:00", project: "BAU Task", detail: "Task 3", minutes: 15, company: "Allica"}
- {date_time: "2019-04-23 09:00:00", project: "BAU Task", detail: "Task 4", minutes: 15, company: "Sainsbury's"}
- {date_time: "2019-04-23 08:15:00", project: "BAU Task", detail: "Task 1", minutes: 15}
- {date_time: "2019-04-23 08:30:00", project: "BAU Task", detail: "Task 2", minutes: 15}
- {date_time: "2019-04-23 08:45:00", project: "BAU Task", detail: "Task 3", minutes: 15}
- {date_time: "2019-04-23 09:00:00", project: "BAU Task", detail: "Task 4", minutes: 15}
expect:
rows:
# prettier-ignore
- {date_time: "2019-04-23 08:15:00", project: "BAU Task", detail: "Task 1", minutes: 15, company: "TSB"}
- {date_time: "2019-04-23 08:30:00", project: "BAU Task", detail: "Task 2", minutes: 15, company: "Jaja"}
- {date_time: "2019-04-23 08:45:00", project: "BAU Task", detail: "Task 3", minutes: 15, company: "Allica"}
- {date_time: "2019-04-23 09:00:00", project: "BAU Task", detail: "Task 4", minutes: 15, company: "Sainsbury's"}
- {date_time: "2019-04-23 08:15:00", project: "BAU Task", detail: "Task 1", minutes: 15}
- {date_time: "2019-04-23 08:30:00", project: "BAU Task", detail: "Task 2", minutes: 15}
- {date_time: "2019-04-23 08:45:00", project: "BAU Task", detail: "Task 3", minutes: 15}
- {date_time: "2019-04-23 09:00:00", project: "BAU Task", detail: "Task 4", minutes: 15}
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ unit_tests:
- input: ref("stg__daily_tracker")
rows:
# prettier-ignore
- {date_time: "2019-04-23 08:15:00", project: "BAU Task", detail: "Task 1", minutes: 15, company: "TSB"}
- {date_time: "2019-04-23 08:30:00", project: "BAU Task", detail: "Task 2", minutes: 15, company: "Jaja"}
- {date_time: "2019-04-23 08:45:00", project: "BAU Task", detail: "Task 3", minutes: 15, company: "Allica"}
- {date_time: "2019-04-23 09:00:00", project: "BAU Task", detail: "Task 4", minutes: 15, company: "Sainsbury's"}
- {date_time: "2019-04-23 08:15:00", project: "BAU Task", detail: "Task 1", minutes: 15}
- {date_time: "2019-04-23 08:30:00", project: "BAU Task", detail: "Task 2", minutes: 15}
- {date_time: "2019-04-23 08:45:00", project: "BAU Task", detail: "Task 3", minutes: 15}
- {date_time: "2019-04-23 09:00:00", project: "BAU Task", detail: "Task 4", minutes: 15}
expect:
rows:
# prettier-ignore
Expand Down
11 changes: 0 additions & 11 deletions billiam_database/models/staging/_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,6 @@ models:
because time was spent on other tasks before 10:00 and after 10:00.
data_tests:
- not_null
- name: company
data_type: text
description: >
The employer at the time of recording.
In a future iteration of this project, this will instead be captured
in a seed with the from- and to- employment dates.
data_tests:
- not_null
- accepted_values:
values: ["TSB", "Jaja", "Allica", "Sainsbury''s"]

- name: stg__finances
description: '{{ doc("stg__finances") }}'
Expand Down
1 change: 0 additions & 1 deletion billiam_database/models/staging/stg__daily_tracker.sql
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ final as (
trim("task") as project,
coalesce(trim(detail), '') as detail,
"interval"::integer as minutes,
trim(company) as company
from src_tracker
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
# - input: source("raw", "daily_tracker")
# rows:
# # prettier-ignore
# - {date_time: "2019-04-23 08:15:00", task: "BAU Task ", detail: "Running Unsecured Master Code ", interval: 15, company: TSB}
# - {date_time: "2019-04-23 08:30:00", task: "Adhoc Task ", detail: "Working on this workbook ", interval: 15, company: TSB}
# - {date_time: "2019-04-23 08:45:00", task: "Documentation", detail: "Weekly Wellness Procedure Guide", interval: 15, company: TSB}
# - {date_time: "2019-04-23 09:00:00", task: "Something ", detail: "Weekly Wellness ", interval: 15, company: TSB}
# - {date_time: "2019-04-23 08:15:00", task: "BAU Task ", detail: "Running Unsecured Master Code ", interval: 15}
# - {date_time: "2019-04-23 08:30:00", task: "Adhoc Task ", detail: "Working on this workbook ", interval: 15}
# - {date_time: "2019-04-23 08:45:00", task: "Documentation", detail: "Weekly Wellness Procedure Guide", interval: 15}
# - {date_time: "2019-04-23 09:00:00", task: "Something ", detail: "Weekly Wellness ", interval: 15}
# expect:
# rows:
# # prettier-ignore
# - {date_time: "2019-04-23 08:15:00", task: "BAU Task", detail: "Running Unsecured Master Code", interval: 15, company: TSB}
# - {date_time: "2019-04-23 08:30:00", task: "Adhoc Task", detail: "Working on this workbook", interval: 15, company: TSB}
# - {date_time: "2019-04-23 08:45:00", task: "Documentation", detail: "Weekly Wellness Procedure Guide", interval: 15, company: TSB}
# - {date_time: "2019-04-23 09:00:00", task: "Something", detail: "Weekly Wellness", interval: 15, company: TSB}
# - {date_time: "2019-04-23 08:15:00", task: "BAU Task", detail: "Running Unsecured Master Code", interval: 15}
# - {date_time: "2019-04-23 08:30:00", task: "Adhoc Task", detail: "Working on this workbook", interval: 15}
# - {date_time: "2019-04-23 08:45:00", task: "Documentation", detail: "Weekly Wellness Procedure Guide", interval: 15}
# - {date_time: "2019-04-23 09:00:00", task: "Something", detail: "Weekly Wellness", interval: 15}

0 comments on commit 8180da2

Please sign in to comment.