feat: Convert PDP ingestion notebooks into DAB - #272
Open
nm3224 wants to merge 3 commits into
Open
Conversation
Capture automation approach, file discovery modes, school validation, and gcp_config decoupling before implementation. Co-authored-by: Cursor <cursoragent@cursor.com>
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pipelines/ingestion/pdpthat automates NSC/PDP SFTP → bronze ingestion (replaces interactivePIPELINE_pdp_to_databricks.py).sftp_receive_scan→file_institution_expand→per_institution_bronze_ingest(git-sourced scripts undersrc/edvise/ingestion/nsc_sftp/).uningested(default) /latestvia shared_YYYYMMDDHHMMSScohort+course pairs andingestion_manifest.gcp_config.yamledit 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 devJob params:
file_selection_mode:uningested(default),latest, ormanualcohort_file_name/course_file_name: optional; when both set, forces manual selectionPrereqs: UC catalog (
DB_workspace), staging volumedefault.tmp, secret scopensc-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.pydev_sst_02and run with explicit cohort/course filenamesfile_selection_mode=uningestedagainst SFTPBRONZE_WRITTENpairs