saurabh18cs
Honored Contributor III

Ensure you are specifying the database (or schema) where the table should be created.

(If you are using the default database, you can omit the database name.)

 

database_name = "your_database_name"  # Replace with your actual database name
table_name = f"{database_name}.season"
target_df.write.mode("overwrite").saveAsTable(table_name)

View solution in original post