Skip to content

Commit

Permalink
Merge pull request #43 from uche-madu/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
uche-madu authored Oct 19, 2023
2 parents eac0d9f + 85d0beb commit 26f08b2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions pyspark-scripts/process_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,10 @@ def main():

# Save the DataFrame to BigQuery
(log_df_parsed.write.format("bigquery")
.option("table", f"{BQ_DATASET_NAME}.{BQ_LOG_REVIEWS_TABLE}")
.option("temporaryGcsBucket", GCS_BUCKET)
# .option("partitionField", "day")
.mode("append")
.save()
.save(f"{BQ_DATASET_NAME}.{BQ_LOG_REVIEWS_TABLE}")
)

if __name__ == "__main__":
Expand Down
6 changes: 4 additions & 2 deletions pyspark-scripts/process_movies.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,12 @@ def main() -> None:

# Save the DataFrame to BigQuery
(result_df.write.format("bigquery")
.option("table", f"{BQ_DATASET_NAME}.{BQ_MOVIE_REVIEWS_TABLE}")
.option("temporaryGcsBucket", GCS_BUCKET)
# .option("partitionField", "insert_date")
.mode("append")
.save()
.save(f"{BQ_DATASET_NAME}.{BQ_MOVIE_REVIEWS_TABLE}")
)


if __name__ == "__main__":
main()

0 comments on commit 26f08b2

Please sign in to comment.