Skip to content

Commit

Permalink
generate partitions with timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
ferugit committed Mar 10, 2023
1 parent af43a6e commit f8c592f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/prepare_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import os
import json
import datetime
import argparse
import pandas as pd

Expand Down Expand Up @@ -136,7 +137,11 @@ def main(args):
if (not os.path.isfile(args.src)) and (not os.path.isdir(args.dst)):
raise Exception('Non valid arguments!')

output_path = args.dst
# Get timestamp
date = datetime.datetime.now()
timestamp = str(date).replace(" ", "").replace("-", "").replace(":", "").split(".")[0]
output_path = os.path.join(args.dst, "partition_" + timestamp)

check_path(output_path)

# Read tsv
Expand Down

0 comments on commit f8c592f

Please sign in to comment.