Skip to content

[DEV-13391] Populate the rpt.transaction_download table in Delta#4583

Merged
sethstoudenmier merged 19 commits intoqatfrom
ftr/dev-13391-populate-transaction-download-table
Mar 11, 2026
Merged

[DEV-13391] Populate the rpt.transaction_download table in Delta#4583
sethstoudenmier merged 19 commits intoqatfrom
ftr/dev-13391-populate-transaction-download-table

Conversation

@sethstoudenmier
Copy link
Contributor

@sethstoudenmier sethstoudenmier commented Jan 27, 2026

Description:

Populate the rpt.transaction_download table in Delta to match the contents of the Transaction Download from Monthly Downloads.

Technical Details:

A new Spark DataFrame was created to manage the logic for the rpt.transaction_download table. Originally the intention was to use the silver tables (e.g., int.transaction_normalized), however, during development I realized that there were some columns that the downloads use and are currently created on rpt.transaction_search. To avoid an even larger changeset than what I currently had the decision was made to use rpt.transaction_search instead and create follow-up work that migrates to the use of silver tables.

Additionally, the rpt.transaction_download table was originally created with column names that didn't match exactly the downloads or rpt.transaction_search. The intention was to use more normalized column names since our current transaction column names are sometimes inconsistent. After working to populate the table I made the decision to move away from this approach and instead use the rpt.transaction_search names, making it easier to map 1:1. This also avoids the column names in the data from being tied too closely to the download column names since those could change.

Requirements for PR Merge:

  1. Unit & integration tests updated
  2. API documentation updated (examples listed below)
    1. API Contracts
    2. API UI
    3. Comments
  3. Data validation completed (examples listed below)
    1. Does this work well with the current frontend? Or is the frontend aware of a needed change?
    2. Is performance impacted in the changes (e.g., API, pipeline, downloads, etc.)?
    3. Is the expected data returned with the expected format?
  4. Appropriate Operations ticket(s) created
  5. Jira Ticket(s)
    1. DEV-13391

Explain N/A in above checklist:

@sethstoudenmier sethstoudenmier added the do not merge [PR] shouldn't be merged label Jan 27, 2026
Copy link
Contributor

@zachflanders-frb zachflanders-frb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

self.treasury_appropriation_account = spark.table("global_temp.treasury_appropriation_account")

@cached_property
def defc_by_group(self):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def defc_by_group(self):
def defc_by_group(self) -> dict[str, list[str]]:

@sethstoudenmier sethstoudenmier removed the do not merge [PR] shouldn't be merged label Mar 10, 2026
@sethstoudenmier sethstoudenmier merged commit 2f5e05f into qat Mar 11, 2026
18 checks passed
@sethstoudenmier sethstoudenmier deleted the ftr/dev-13391-populate-transaction-download-table branch March 11, 2026 14:18
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.

2 participants