Skip to content

feat: Convert PDP ingestion notebooks into DAB - #272

Open
nm3224 wants to merge 3 commits into
developfrom
feat/convert-pdp-ingestion-notebooks-into-dab
Open

feat: Convert PDP ingestion notebooks into DAB#272
nm3224 wants to merge 3 commits into
developfrom
feat/convert-pdp-ingestion-notebooks-into-dab

Conversation

@nm3224

@nm3224 nm3224 commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds a Databricks Asset Bundle at pipelines/ingestion/pdp that automates NSC/PDP SFTP → bronze ingestion (replaces interactive PIPELINE_pdp_to_databricks.py).
  • Job chain: sftp_receive_scanfile_institution_expandper_institution_bronze_ingest (git-sourced scripts under src/edvise/ingestion/nsc_sftp/).
  • File selection supports manual filenames or auto modes: uningested (default) / latest via shared _YYYYMMDDHHMMSS cohort+course pairs and ingestion_manifest.
  • School resolution uses SST API + bronze schema/volume discovery (no per-school gcp_config.yaml edit for scheduled runs), with cohort/term and unresolved/no-bronze logging.

How to run

databricks bundle deploy --target dev --var "git_commit=$(git rev-parse HEAD)" ...
databricks bundle run nsc_sftp_automated_ingestion --target dev

Job params:

  • file_selection_mode: uningested (default), latest, or manual
  • cohort_file_name / course_file_name: optional; when both set, forces manual selection

Prereqs: UC catalog (DB_workspace), staging volume default.tmp, secret scope nsc-sftp-asset, bronze schemas/volumes for schools in the file.

Test plan

  • uv run python -m pytest tests/ingestion/test_file_selection.py tests/ingestion/test_nsc_sftp_helper.py
  • Deploy bundle to dev_sst_02 and run with explicit cohort/course filenames
  • Run with empty filenames + file_selection_mode=uningested against SFTP
  • Confirm school-check logs (rows, latest cohort/term, API resolve, missing bronze)
  • Confirm idempotency: second run skips already BRONZE_WRITTEN pairs

Capture automation approach, file discovery modes, school
validation, and gcp_config decoupling before implementation.

Co-authored-by: Cursor <cursoragent@cursor.com>
@nm3224
nm3224 requested a review from a team as a code owner August 5, 2026 20:54
@nm3224
nm3224 requested review from kaylawilding and removed request for a team August 5, 2026 20:54
nm3224 and others added 2 commits August 5, 2026 13:58
Replace the interactive PIPELINE_pdp_to_databricks flow with a
schedulable 01→02→03 job under pipelines/ingestion/pdp, including
uningested/latest cohort-course discovery and school-check logging.

Co-authored-by: Cursor <cursoragent@cursor.com>
Avoid full-listing Spark fingerprinting for file selection, read only
the institution column during expand, and groupby institutions once
per staged file during bronze writes.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

1 participant