Skip to content

Commit

Permalink
fix: write .txt on brazilian job via DF
Browse files Browse the repository at this point in the history
  • Loading branch information
leo-the-nardo committed Nov 9, 2024
1 parent 3372902 commit 1c327fd
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions spark-jobs/brazilian-finder/brazilian-finder_spark.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,8 @@ def spark_job(spark: SparkSession, params, *args, **kwargs):
""")

# Write to silver delta table as a .txt file with original emails
spark.sql(f"""
INSERT OVERWRITE TEXT.`{s3_output_path}`
SELECT email_tel
FROM matching_emails
""")
matching_emails_df = spark.sql("SELECT email_tel FROM matching_emails")
matching_emails_df.write.mode("overwrite").text(s3_output_path)

# Append the matching emails to the master delta table
spark.sql(f"""
Expand Down

0 comments on commit 1c327fd

Please sign in to comment.