Skip to content

Commit a5d9cd5

Browse files
formatting partition values
1 parent 58f2b90 commit a5d9cd5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/jobs/data_and_insight/icaseworks_ingest_to_raw.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@ def get_report_fromtime(report_id, timestamp_to_call, auth_headers, auth_payload
117117
def dump_dataframe(response, location, filename):
118118
df = pd.DataFrame.from_dict(response.json(), orient="columns")
119119

120-
df["import_year"] = datetime.today().year
121-
df["import_month"] = datetime.today().month
122-
df["import_day"] = datetime.today().day
120+
df["import_year"] = datetime.today().strftime("%Y")
121+
df["import_month"] = datetime.today().strftime("%m")
122+
df["import_day"] = datetime.today().strftime("%d")
123123
df["import_date"] = datetime.today().strftime("%Y%m%d")
124124

125125
print(f"Database: {target_database}")

0 commit comments

Comments
 (0)