Skip to content

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

Open
PrinceSajjadHussain wants to merge 1 commit intoDataExpert-io:mainfrom
PrinceSajjadHussain:fix-9c4eca1c
Open

Fix: Incorrect table name in do_team_vertex_transformation's write operation#288
PrinceSajjadHussain wants to merge 1 commit intoDataExpert-io:mainfrom
PrinceSajjadHussain:fix-9c4eca1c

Conversation

@PrinceSajjadHussain
Copy link
Copy Markdown
Contributor

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")

Copy link
Copy Markdown
Member

@EcZachly EcZachly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix for the table name in do_team_vertex_transformation is necessary to prevent errors and ensure data is written to the correct table. This correction aligns with the intended job functionality.

Recommendation: Approve for Merge

Copy link
Copy Markdown
Member

@EcZachly EcZachly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revoke previous approval due to changes needed.

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.

2 participants