X-Git-Url: https://code.communitydata.science/cdsc_reddit.git/blobdiff_plain/6d4344355b256f7df3c3f60f891ea44d453f4d6c..34185337c9c6f073ce8f8cb0e1b7ea605861b6e8:/submissions_2_parquet.py diff --git a/submissions_2_parquet.py b/submissions_2_parquet.py index 6e46970..0142210 100755 --- a/submissions_2_parquet.py +++ b/submissions_2_parquet.py @@ -201,7 +201,7 @@ df2.write.parquet("/gscratch/comdata/output/reddit_submissions_by_subreddit.parq # we also want to have parquet files sorted by author then reddit. -df3 = df.sort(["author","subreddit","id","Year","Month","Day"],ascending=True) +df3 = df.sort(["author","CreatedAt","subreddit","id","Year","Month","Day"],ascending=True) df3.write.parquet("/gscratch/comdata/output/reddit_submissions_by_author.parquet", partitionBy=["Year",'Month'], mode='overwrite') os.remove("/gscratch/comdata/output/reddit_submissions.parquet_temp")