Skip to content

Commit f91f1cf

Browse files
committed
Test restricted upload
1 parent 61fa179 commit f91f1cf

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

phoenix-data/csv_to_json.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,9 @@ def unique(x):
7171
filename = f"{timestamp}.json"
7272
# Write the JSON file
7373
#with open(os.path.join(output_dir, filename), "w") as json_file:
74-
with s3.open(f"{bucket}/{filename}", "w") as json_file:
75-
json.dump(json_data, json_file, indent=4)
74+
#We're just going to upload current date files
75+
today = datetime.date.today().strftime("%Y-%m-%d")
76+
date = timestamp.split("T")[0]
77+
if date == today:
78+
with s3.open(f"{bucket}/{filename}", "w") as json_file:
79+
json.dump(json_data, json_file, indent=4)

0 commit comments

Comments
 (0)