Skip to content

Commit 27126fc

Browse files
authored
Update metadata files for version release; minor cleanup in EarthbeamDAG. (#74)
1 parent 71550d7 commit 27126fc

File tree

3 files changed

+16
-8
lines changed

3 files changed

+16
-8
lines changed

CHANGELOG.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1-
## edu_edfi_airflow v0.4.0
1+
# edu_edfi_airflow v0.4.1
2+
## Under the hood
3+
- Wrap Snowflake stage with single quotes to support filepaths with special characters
4+
5+
## Fixes
6+
- Fix bugs where files written to S3 could be overwritten in `EarthbeamDAG`
7+
- Fix bug where optional files fail upload to S3
8+
9+
10+
11+
# edu_edfi_airflow v0.4.0
212
## New features
313
- Add `EarthbeamDAG.partition_on_tenant_and_year()`, a preprocessing function to shard data to parquet on disk. This is useful when a single input file contains multiple years and/or tenants.
414
- Add `EarthbeamDAG.build_dynamic_tenant_year_task_group()` to build dynamic Earthbeam task groups for each file to process in a source folder
@@ -12,6 +22,7 @@
1222
- Refactor `EarthbeamDAG` to use Airflow TaskFlow syntax and simplify Earthbeam task groups
1323
- Deprecate `EarthbeamDAG.build_tenant_year_task_group()` argument `raw_dir`
1424

25+
1526
# edu_edfi_airflow v0.3.1
1627
## Fixes
1728
- Fix bug where updates to query-parameters persisted across every `EdFiResourceDAG`

edu_edfi_airflow/dags/earthbeam_dag.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -739,11 +739,11 @@ def upload_to_s3(filepaths: Union[str, List[str]], subdirectory: str, s3_file_su
739739
raise ValueError(
740740
"Argument `s3_filepath` must be defined to upload transformed Earthmover files to S3."
741741
)
742-
743742

744-
filepaths = [filepaths] if isinstance(filepaths, str) else filepaths
745-
file_basename = self.get_filename(filepaths[0])
743+
filepaths = [filepaths] if isinstance(filepaths, str) else filepaths # Data-dir is passed as a singleton
744+
s3_file_subdirs = [None] * len(filepaths) if not s3_file_subdirs else s3_file_subdirs
746745

746+
file_basename = self.get_filename(filepaths[0])
747747
s3_full_filepath = edfi_api_client.url_join(
748748
s3_filepath, subdirectory,
749749
tenant_code, self.run_type, api_year, grain_update,
@@ -752,9 +752,6 @@ def upload_to_s3(filepaths: Union[str, List[str]], subdirectory: str, s3_file_su
752752
)
753753
s3_full_filepath = context['task'].render_template(s3_full_filepath, context)
754754

755-
filepaths = [filepaths] if isinstance(filepaths, str) else filepaths # Data-dir is passed as a singleton
756-
s3_file_subdirs = [None] * len(filepaths) if not s3_file_subdirs else s3_file_subdirs
757-
758755
# Zip optional subdirectories if specified; make secondary file-uploads optional
759756
for idx, (filepath, file_subdir) in enumerate(zip(filepaths, s3_file_subdirs)):
760757
filepath = context['task'].render_template(filepath, context)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
setuptools.setup(
88
name='edu_edfi_airflow',
9-
version='0.4.0',
9+
version='0.4.1',
1010

1111
description='EDU Airflow tools for Ed-Fi',
1212
license_files=['LICENSE.md'],

0 commit comments

Comments
 (0)