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: add u_storedgrades_de #2495

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
17 changes: 17 additions & 0 deletions src/dbt/powerschool/models/sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1249,3 +1249,20 @@ sources:
max_staleness: INTERVAL 1 DAY
format: AVRO
enable_logical_types: true
- name: src_powerschool__u_storedgrades_de
meta:
dagster:
asset_key:
- "{{ project_name }}"
- powerschool
- u_storedgrades_de
external:
location:
"{{ var('cloud_storage_uri_base', env_var('DBT_DEV_CLOUD_STORAGE_URI_BASE', ''))
}}/powerschool/u_storedgrades_de/*"
options:
connection_name: "{{ var('bigquery_external_connection_name') }}"
metadata_cache_mode: AUTOMATIC
max_staleness: INTERVAL 1 DAY
format: AVRO
enable_logical_types: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
select
de_course_name,
de_semester,
whocreated,
whencreated,
whomodified,
whenmodified,
de_score,
de_institution,

id.int_value as id,
storedgradesdcid.int_value as storedgradesdcid,
de_pass_yn.int_value as de_pass_yn,
from {{ source("powerschool", "src_powerschool__u_storedgrades_de") }}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ assets:
partition_column: whenmodified
- asset_name: emailaddress
partition_column: whenmodified
- asset_name: gpstudentwaiver
partition_column: whenmodified
- asset_name: gradescaleitem
partition_column: whenmodified
- asset_name: originalcontactmap
Expand Down Expand Up @@ -62,7 +64,7 @@ assets:
partition_column: whenmodified
- asset_name: u_clg_et_stu_alt
partition_column: whenmodified
- asset_name: gpstudentwaiver
- asset_name: u_storedgrades_de
partition_column: whenmodified
- asset_name: userscorefields
partition_column: whenmodified
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ assets:
partition_column: whenmodified
- asset_name: u_clg_et_stu_alt
partition_column: whenmodified
- asset_name: u_storedgrades_de
partition_column: whenmodified
- asset_name: userscorefields
partition_column: whenmodified
- asset_name: cc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ assets:
partition_column: whenmodified
- asset_name: userscorefields
partition_column: whenmodified
- asset_name: u_storedgrades_de
partition_column: whenmodified
- asset_name: u_studentsuserfields
partition_column: whenmodified
select_columns:
Expand Down
12 changes: 12 additions & 0 deletions tests/assets/test_assets_powerschool_sis.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,3 +234,15 @@ def test_userscorefields_kippnewark():
ssh_powerschool=get_ssh_powerschool_resource(CODE_LOCATION.upper()),
db_powerschool=get_db_powerschool_resource(CODE_LOCATION.upper()),
)


def test_u_storedgrades_de_kippnewark():
from teamster.code_locations.kippnewark import CODE_LOCATION
from teamster.code_locations.kippnewark.powerschool import assets

_test_asset(
assets=assets,
asset_name="u_storedgrades_de",
ssh_powerschool=get_ssh_powerschool_resource(CODE_LOCATION.upper()),
db_powerschool=get_db_powerschool_resource(CODE_LOCATION.upper()),
)