Skip to content

Add ETL script for legacy CofE export from the AS400#938

Merged
jeancochrane merged 10 commits intomasterfrom
jeancochrane/131-coe-comparison
Mar 10, 2026
Merged

Add ETL script for legacy CofE export from the AS400#938
jeancochrane merged 10 commits intomasterfrom
jeancochrane/131-coe-comparison

Conversation

@jeancochrane
Copy link
Copy Markdown
Member

@jeancochrane jeancochrane commented Dec 8, 2025

This PR updates the ccao-legacy.R ETL script to add two new tables:

  • ccao.cct_as_cofe_hdr: Header table for CofEs in the AS400, containing unique identifiers for each case
  • ccao.cct_as_cofe_dtl: Detail table for CofEs in the AS400, containing one or more hearings for each case in the header table with detailed hearing information

These scripts have already run, and the data is already in use in https://github.com/ccao-data/enterprise-intelligence/pull/382. This PR just persists the ETL logic in case we need it in the future.

Connects https://github.com/ccao-data/enterprise-intelligence/issues/381.

@jeancochrane jeancochrane changed the title Add ETL script for legacy CofE data from the AS400 Add ETL script for legacy CofE export from the AS400 Dec 8, 2025
@jeancochrane jeancochrane marked this pull request as ready for review March 9, 2026 20:52
@jeancochrane jeancochrane requested a review from a team as a code owner March 9, 2026 20:52
@jeancochrane jeancochrane requested a review from wrridgeway March 9, 2026 20:52
Copy link
Copy Markdown
Member

@wrridgeway wrridgeway left a comment

Choose a reason for hiding this comment

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

Thanks for adding this to the ETL repo.

Comment on lines +414 to +421
arrow::write_dataset(
path = file.path(
output_bucket, "cct_as_cofe_hdr"
),
format = "parquet",
hive_style = TRUE,
compression = "zstd"
)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I encourage everyone to use our utils function for this when possible. It handles the loaded_at generation and partitions based on the grouping column.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Great point, I switched the two new tables over to write_partitions_to_s3() in dcc9895.

@jeancochrane jeancochrane merged commit 920965f into master Mar 10, 2026
7 checks passed
@jeancochrane jeancochrane deleted the jeancochrane/131-coe-comparison branch March 10, 2026 18:17
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