Each row of my dataframe has a CSV content.
I am strugling to save each row in a different and specific table.
I believe I need to use a foreach or UDF in order to accomplish this, but this is simply not working.
All the content I managed to find was just like simple prints inside foreachs or codes using .collect() (which I really don't want to use).
I also found the repartition way, but that doesn't allow me to choose where each row will go.
rows = df.count()
df.repartition(rows).write.csv('save-dir')
Can you give me a simple and working example of it?