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

Revert last 4 commits b525592 fca2bc1 61d1aaa ab1e79d #28

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ repos:
# hooks:
# - id: black
## need to work on this some more
- repo: https://github.com/sqlfluff/sqlfluff
rev: 3.0.6
hooks:
- id: sqlfluff-fix
# # args: ["."]
additional_dependencies:
["dbt-duckdb~=1.7.1", "sqlfluff-templater-dbt~=3.0.6"]
# - repo: https://github.com/sqlfluff/sqlfluff
# rev: 3.0.6
# hooks:
# - id: sqlfluff-fix
# # # args: ["."]
# additional_dependencies:
# ["dbt-duckdb~=1.7.1", "sqlfluff-templater-dbt~=3.0.6"]
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def _get_s3_url(self, context: OutputContext) -> str:
id = context.get_asset_identifier()
else:
id = context.get_identifier()
return f"s3://{self.bucket_name}/{self.prefix}/{'/'.join(id)}/{'-'.join(id)}.parquet"
return f"s3://{self.bucket_name}/{self.prefix}/{'/'.join(id)}.parquet"

def handle_output(self, context: OutputContext, obj) -> None:
if obj is None:
Expand Down
10 changes: 0 additions & 10 deletions reports/pages/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ The data comes from a mix of [New South Wales Department of Education](https://e
fmt="####"
/>
<LineBreak/>
<Alert status="warning">
⚠️ Attendance metric is averaging an average (which statistically is a terrible idea). Do not use. Only indicative.
</Alert>
<LineBreak/>
<!-- <BigValue
data={aparent_retention_rate_7_to_10}
Expand Down Expand Up @@ -448,13 +445,6 @@ The data comes from a mix of [New South Wales Department of Education](https://e
More Details on useage
</LinkButton >
<LineBreak/>
<Alert status="info">

ℹ️ Usage will appear as an error for open source users. I have a seperate workflow that gets usage data requiring API secrets. I dont expose these secrets. So will just show an error when the public are creating the report. But when it goes to production and through CICD we see usage.

</Alert>
<LineBreak/>


<!-- - attendance_rate
- apprenticeship_traineeship_training_contract_approvals
Expand Down
Original file line number Diff line number Diff line change
@@ -1,50 +1,43 @@
with unioned as (
select
central.school_performance_directorate,
central.school_code,
central.school_name,
central.calendar_year,
central.enrolments_central as enrolments,
school_performance_directorate,
school_code,
school_name,
calendar_year,
enrolments_central as enrolments,
'central' as school_type,
from {{ ref('stg__nsw_doe_datansw__enrolments_central') }} as central
from {{ ref('stg__nsw_doe_datansw__enrolments_central') }}
union all
select
prim.school_performance_directorate,
prim.school_code,
prim.school_name,
prim.calendar_year,
prim.enrolments_primary as enrolments,
school_performance_directorate,
school_code,
school_name,
calendar_year,
enrolments_primary as enrolments,
'primary' as school_type,
from {{ ref('stg__nsw_doe_datansw__enrolments_primary') }} as prim
from {{ ref('stg__nsw_doe_datansw__enrolments_primary') }}
union all
select
secondary.school_performance_directorate,
secondary.school_code,
secondary.school_name,
secondary.calendar_year,
secondary.enrolments_secondary as enrolments,
school_performance_directorate,
school_code,
school_name,
calendar_year,
enrolments_secondary as enrolments,
'secondary' as school_type,
from {{ ref('stg__nsw_doe_datansw__enrolments_secondary') }} as secondary
from {{ ref('stg__nsw_doe_datansw__enrolments_secondary') }}
union all
select
ssp.school_performance_directorate,
ssp.school_code,
ssp.school_name,
ssp.calendar_year,
ssp.enrolments_ssp as enrolments,
school_performance_directorate,
school_code,
school_name,
calendar_year,
enrolments_ssp as enrolments,
'ssp' as school_type,
from {{ ref('stg__nsw_doe_datansw__enrolments_ssp') }} as ssp
),

final as (
select
unioned.school_performance_directorate,
unioned.school_code,
unioned.school_name,
unioned.calendar_year,
unioned.enrolments,
from {{ ref('stg__nsw_doe_datansw__enrolments_ssp') }}
)
, final as (

Check warning on line 38 in transformation/transformation_nsw_doe/models/preperation/prep__enrolment.sql

View workflow job for this annotation

GitHub Actions / CI Quick Check - Linting, Formatting, and unit tests. Doesnt build anything in any databases.

SQLFluff

LT04: Found leading comma ','. Expected only trailing near line breaks. [layout.commas]

Check warning on line 38 in transformation/transformation_nsw_doe/models/preperation/prep__enrolment.sql

View workflow job for this annotation

GitHub Actions / CI Quick Check - Linting, Formatting, and unit tests. Doesnt build anything in any databases.

SQLFluff

LT08: Blank line expected but not found after CTE closing bracket. [layout.cte_newline]

Check warning on line 38 in transformation/transformation_nsw_doe/models/preperation/prep__enrolment.sql

View workflow job for this annotation

GitHub Actions / CI Quick Check - Linting, Formatting, and unit tests. Doesnt build anything in any databases.

SQLFluff

LT04: Found leading comma ','. Expected only trailing near line breaks. [layout.commas]

Check warning on line 38 in transformation/transformation_nsw_doe/models/preperation/prep__enrolment.sql

View workflow job for this annotation

GitHub Actions / CI Quick Check - Linting, Formatting, and unit tests. Doesnt build anything in any databases.

SQLFluff

LT08: Blank line expected but not found after CTE closing bracket. [layout.cte_newline]
from unioned
where unioned.school_code != '-' -- data quality issue
where school_code != '-' -- data quality issue
)

{{ dbt_audit(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,6 @@ saved_queries:
- funding_aud_post_adjustments
- funding_aud_original
- funding_aud_post_adjustments_prev_year
- attendance_rate
- enrolments
# - funding_aud_post_adjustments_yoy
group_by:
- Dimension('school__school_name')
Expand Down
Loading