Skip to content

Commit

Permalink
Fix: processos and save full load to non exists table
Browse files Browse the repository at this point in the history
  • Loading branch information
TeoCalvo authored and TeoCalvo committed Nov 26, 2023
1 parent 97a3150 commit 74f1329
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/02.bronze/dota/ingestao.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,12 @@

if not dbtools.table_exists(spark, database_name, table_name):
print("Criando a tabela")
df_null = spark.createDataFrame(data=[], schema=ing.schema)
ing.save_full(df_null)
ing.process_full(df_null)
dbutils.fs.rm(ing.checkpoint_path, True)

else:
print("Tabela já existente")

print(ing.query)
print(ing.schema)

# COMMAND ----------

stream = ing.process_stream()

0 comments on commit 74f1329

Please sign in to comment.