Skip to content

[DOP-22146] Set the names of saved files #201

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

Merged
merged 1 commit into from
Feb 13, 2025

Conversation

IlyasDevelopment
Copy link
Contributor

@IlyasDevelopment IlyasDevelopment commented Feb 12, 2025

Change Summary

  • Implemented logic for handling file_name_template in the worker:
    • For FileDFWriter + FileUploader (it's FileProtocolHandler): after writing files, rename them based on the template before passing to FileUploader
    • For FileDFWriter without FileUploader: write files to a temp directory (target.directory_path / ".tmp" / run.id), rename them, then move to target.directory_path using FileMover
  • Updated integration tests to verify that generated filenames match the expected format
  • Substituted template placeholders:
    • extension: {format}.{compression} for columnar formats (e.g., snappy.orc), {compression}.{format} for text formats (e.g., csv.gz)
    • index: sequential file number
    • run_id, run_created_at: retrieved from run, with run_created_at formatted as "%Y_%m_%d_%H_%M_%S".

Connected with #196

Checklist

  • Commit message and PR title is comprehensive
  • Keep the change as small as possible
  • Unit and integration tests for the changes exist
  • Tests pass on CI and coverage does not decrease
  • Documentation reflects the changes where applicable
  • docs/changelog/next_release/<pull request or issue id>.<change type>.rst file added describing change
    (see CONTRIBUTING.rst for details.)
  • My PR is ready to review.

@IlyasDevelopment IlyasDevelopment self-assigned this Feb 12, 2025
@IlyasDevelopment IlyasDevelopment marked this pull request as ready for review February 13, 2025 14:01
@IlyasDevelopment IlyasDevelopment merged commit 9d1e591 into develop Feb 13, 2025
23 of 24 checks passed
@IlyasDevelopment IlyasDevelopment deleted the feature/DOP-22146 branch February 13, 2025 14:02
Copy link

codecov bot commented Feb 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 0.00%. Comparing base (98f006c) to head (3e50455).
Report is 1 commits behind head on develop.

❌ Your project status has failed because the head coverage (0.00%) is below the target coverage (92.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@      Coverage Diff       @@
##   develop   #201   +/-   ##
==============================
==============================

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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