Skip to content

Fix: Incorrect table name in do_team_vertex_transformation's write operation #288

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

PrinceSajjadHussain
Copy link

In the team_vertex_job.py file, the main function incorrectly attempts to write the output DataFrame into a table named "players_scd", which is likely meant for the players SCD job. This will cause an error if the table does not exist or write data to the wrong table.

Fix:
--- a/bootcamp/materials/3-spark-fundamentals/src/jobs/team_vertex_job.py
+++ b/bootcamp/materials/3-spark-fundamentals/src/jobs/team_vertex_job.py
@@ -42,4 +42,4 @@
.appName("players_scd")
.getOrCreate()
output_df = do_team_vertex_transformation(spark, spark.table("players"))

  • output_df.write.mode("overwrite").insertInto("players_scd")
  • output_df.write.mode("overwrite").insertInto("team_vertex")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant