Skip to content
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

Timestamp hive partitions #1634

Merged
merged 5 commits into from
Jul 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def download_feed(
config=record,
response_code=resp.status_code,
response_headers=resp.headers,
download_time=pendulum.now(),
ts=pendulum.now(),
)

extract.save_content(fs=get_fs(), content=resp.content)
Expand Down Expand Up @@ -135,8 +135,8 @@ def download_all(task_instance, execution_date, **kwargs):
), f"we somehow ended up with {len(outcomes)} outcomes from {len(records)} records"

result = DownloadFeedsResult(
start_time=start,
end_time=pendulum.now(),
ts=start,
end=pendulum.now(),
outcomes=outcomes,
filename="results.jsonl",
)
Expand Down
2 changes: 1 addition & 1 deletion airflow/plugins/operators/airtable_to_gcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def make_hive_path(self, bucket: str):
bucket,
f"{self.air_base_name}__{safe_air_table_name}",
f"dt={self.extract_time.to_date_string()}",
f"time={self.extract_time.to_time_string()}",
f"ts={self.extract_time.to_iso8601_string()}",
f"{safe_air_table_name}.jsonl.gz",
)

Expand Down
2 changes: 1 addition & 1 deletion airflow/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
calitp==2022.7.13a9
calitp==2022.7.14a2
intake==0.6.1
ipdb==0.13.4
gusty==0.6.0
Expand Down